From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24084 invoked by alias); 27 Oct 2011 12:11:20 -0000 Received: (qmail 24063 invoked by uid 22791); 27 Oct 2011 12:11:18 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 12:10:59 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p9RCAwvC004746 for ; Thu, 27 Oct 2011 05:10:58 -0700 Received: from qabg14 (qabg14.prod.google.com [10.224.20.206]) by wpaz24.hot.corp.google.com with ESMTP id p9RCA7Zx003992 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 27 Oct 2011 05:10:57 -0700 Received: by qabg14 with SMTP id g14so5323000qab.7 for ; Thu, 27 Oct 2011 05:10:57 -0700 (PDT) Received: by 10.224.215.130 with SMTP id he2mr21802606qab.55.1319717457381; Thu, 27 Oct 2011 05:10:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.215.130 with SMTP id he2mr21802573qab.55.1319717457088; Thu, 27 Oct 2011 05:10:57 -0700 (PDT) Received: by 10.224.80.149 with HTTP; Thu, 27 Oct 2011 05:10:57 -0700 (PDT) In-Reply-To: <92BF63C1-0118-4ED9-BB22-ACB406D2D22D@comcast.net> References: <4E8595F6.7080004@gmail.com> <2460DAAE-C437-469A-BA1A-47343C5DBB45@comcast.net> <4E8F0244-3A3F-4AE2-A13C-DA9503282A97@comcast.net> <4C0389F5-A2DF-4864-8E33-BB893C885C98@comcast.net> <83bot4de4v.fsf@gnu.org> <92BF63C1-0118-4ED9-BB22-ACB406D2D22D@comcast.net> Date: Thu, 27 Oct 2011 13:01:00 -0000 Message-ID: Subject: Re: [RFA] Python: iterator for deep traversal of gdb.Type struct/union fields From: Doug Evans To: Paul Koning Cc: Eli Zaretskii , gdb-patches@sourceware.org, tromey@redhat.com, raise.sail@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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: 2011-10/txt/msg00726.txt.bz2 On Wed, Oct 26, 2011 at 8:11 AM, Paul Koning wrote: > > On Oct 25, 2011, at 4:12 PM, Eli Zaretskii wrote: > >>> From: Paul Koning >>> Date: Tue, 25 Oct 2011 14:54:21 -0400 >>> Cc: Tom Tromey , Li Yu >>> >>> +@item deepitems (@var{type}) >>> +Returns a Python iterator similar to the standard >>> +@code{gdb.Type.iteritems ()} method, except that the iterator returned >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^^ >> Please lose the parentheses. =A0You just want the method's name, and you >> already say that it's a method. =A0So the parentheses don't add anything >> except potential confusion. >> >>> +@end smallexample >>> + >>> +Then in gdb: >> >> You want @noindent before "Then in gdb", to make it look like >> continuation of the previous paragraph, not a beginning of a new one. >> >> Also, please use @value{GDBN} instead of a literal "gdb". >> >>> +(gdb) python import gdb.types >> >> We use @value{GDBP} instead of a literal "(gdb)". >> >> OK with those changes. > > Thanks. =A0Committed with those changes. Hi. Is it too late to change the name to deep_items? I like consistency in the user-facing API and we've been using foo_bar (as does PEP008). [Or is there a special reason for eliding the underscore?] TIA