From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27278 invoked by alias); 16 Mar 2011 20:04:23 -0000 Received: (qmail 27270 invoked by uid 22791); 16 Mar 2011 20:04:21 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 16 Mar 2011 20:04:17 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2GK4FfD026659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Mar 2011 16:04:15 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2GK4EbT004882; Wed, 16 Mar 2011 16:04:15 -0400 From: Phil Muldoon To: Paul Koning Cc: Subject: Re: [python] [patch] Add is_valid to several classes References: <944D0115-C1D1-47F5-B1CD-FE3EC69A2ADC@dell.com> Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Wed, 16 Mar 2011 20:08:00 -0000 In-Reply-To: <944D0115-C1D1-47F5-B1CD-FE3EC69A2ADC@dell.com> (Paul Koning's message of "Wed, 16 Mar 2011 15:34:44 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-03/txt/msg00877.txt.bz2 Paul Koning writes: > On Mar 16, 2011, at 12:02 PM, Phil Muldoon wrote: > >> >> ... >> A @code{gdb.Inferior} object has the following methods: >> >> @table @code >> +@defmethod Inferior is_valid >> +Returns true if the @code{gdb.Inferior} object is valid, false if >> +not. A @code{gdb.Inferior} object will become invalid if the inferior >> +no longer exists within @value{GDBN}. All @code{gdb.Inferior} >> +methods will throw an exception if it is invalid at the time the >> +method is called. > > Should this be "all other ... methods since presumably it doesn't > apply to the is_valid() method. Same in the other places. Yes thanks, noted. > >> ... >> +A @code{gdb.Block} object has the following methods: >> + >> +@table @code >> +@defmethod Block is_valid >> +Returns true if the @code{gdb.Block} object is valid, false if not. A >> +block object can become invalid if the block it refers to doesn't >> +exist anymore in the inferior. All @code{gdb.Block} methods will >> +throw an exception if it is invalid at the time the method is called. >> +This method is also made available to the Python iterator object that >> +@code{gdb.Block} supports via the Python method @code{iter} function. > > The iter built-in function, or any iteration context, right? For example, if b is a gdb.Block, you could say "for x in b:", presumably, and then "x.is_valid()" works. Yep, all iteration contexts that are valid with Python. Thanks Phil