From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27813 invoked by alias); 6 Apr 2009 23:26:19 -0000 Received: (qmail 27803 invoked by uid 22791); 6 Apr 2009 23:26:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Apr 2009 23:26:13 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n36NQC00026223 for ; Mon, 6 Apr 2009 19:26:12 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n36NQD5h028638; Mon, 6 Apr 2009 19:26:13 -0400 Received: from opsy.redhat.com (vpn-12-50.rdu.redhat.com [10.11.12.50]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n36NQ94q016401; Mon, 6 Apr 2009 19:26:11 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id D2586888034; Mon, 6 Apr 2009 17:26:07 -0600 (MDT) To: gdb-patches@sourceware.org Subject: Re: Python pretty-printing [3/6] References: <20090403163024.GB28512@caradoc.them.org> From: Tom Tromey Reply-To: Tom Tromey Date: Mon, 06 Apr 2009 23:26:00 -0000 In-Reply-To: <20090403163024.GB28512@caradoc.them.org> (Daniel Jacobowitz's message of "Fri\, 3 Apr 2009 12\:30\:24 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00117.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: >> +If @var{name} is given, it specifies the name of a type to look up in >> +the inferior. @var{name} is searched for globally. >> +@end defmethod Daniel> So the constructor does a lookup. This will be a little weird if we Daniel> want to create types from scratch someday (could be very useful). At that point we can always make the constructor change its behavior depending on the runtime type of the argument. t = Type(gdb.STRUCT) # make a new struct, STRUCT is an int t = Type("whatever") # look up "whatever" Daniel> And what happens if name is not given? This is some relic or misconception in the code... the name need not be optional. Daniel> Anyway, I wonder if there shouldn't be an explicit lookup Daniel> routine instead. I like it ok the way it is. But, if you really want it changed, I will do that; now is not a super time to do this, but it will only be harder in the future. Thiago, what do you think? Tom