From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22459 invoked by alias); 16 Mar 2010 02:18:12 -0000 Received: (qmail 22449 invoked by uid 22791); 16 Mar 2010 02:18:11 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 02:18:06 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2G2I0Lt015554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Mar 2010 22:18:00 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2G2Hx0c016343; Mon, 15 Mar 2010 22:17:59 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2G2Hvuj024852; Mon, 15 Mar 2010 22:17:58 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A2963378261; Mon, 15 Mar 2010 20:17:57 -0600 (MDT) From: Tom Tromey To: Chris Johns Cc: gdb@sourceware.org Subject: Re: Python Pretty printing a struct References: <4B997F28.4050602@contemporary.net.au> <4B9D73C2.9090307@contemporary.net.au> <4B9EBA17.6070806@contemporary.net.au> Reply-To: tromey@redhat.com Date: Tue, 16 Mar 2010 02:18:00 -0000 In-Reply-To: <4B9EBA17.6070806@contemporary.net.au> (Chris Johns's message of "Tue, 16 Mar 2010 09:52:07 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00093.txt.bz2 >>>>> "Chris" == Chris Johns writes: Chris> def to_string(self): Chris> return 'to_string' Tom> Tom> This seems like a strange definition for this method. Chris> I am not sure I follow. The 'to_string' text was just to show where Chris> the output appeared. Oh, I think I see now. I didn't understand clearly before. Chris> Commenting out the function produced: [...] I think we should at least look at, and probably support, both the case where this method is missing, and the case where this method returns None. Could you file a PR for that? Tom