From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32642 invoked by alias); 16 Mar 2011 20:08:01 -0000 Received: (qmail 32631 invoked by uid 22791); 16 Mar 2011 20:08:00 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 20:07:54 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: [python] [patch] Add is_valid to several classes Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: Date: Wed, 16 Mar 2011 20:14:00 -0000 Cc: Content-Transfer-Encoding: quoted-printable Message-Id: <2153F4C3-F1FE-488F-80C7-3368B2FCDD79@Dell.com> References: <944D0115-C1D1-47F5-B1CD-FE3EC69A2ADC@dell.com> To: 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/msg00879.txt.bz2 On Mar 16, 2011, at 4:04 PM, Phil Muldoon wrote: > Paul Koning writes: >=20 >> On Mar 16, 2011, at 12:02 PM, Phil Muldoon wrote: >>=20 >>> ... >>> +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. >>=20 >> The iter built-in function, or any iteration context, right? For exampl= e, if b is a gdb.Block, you could say "for x in b:", presumably, and then "= x.is_valid()" works. >=20 > Yep, all iteration contexts that are valid with Python. So how about this wording: This method is also made available to the Python iterator object that @c= ode{gdb.Block} provides in iteration context and via the Python @code{iter}= built-in function. paul