This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [python][rfc] Change gdb.Block to use attributes instead ofgetter methods.
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: archer ml <archer at sourceware dot org>
- Date: Sun, 07 Dec 2008 16:41:49 -0200
- Subject: Re: [python][rfc] Change gdb.Block to use attributes instead ofgetter methods.
- References: <cover.1228508475.git.bauerman@br.ibm.com> <1228513335.11550.179.camel@localhost.localdomain> <m31vwmz0i9.fsf@fleche.redhat.com>
El vie, 05-12-2008 a las 16:05 -0700, Tom Tromey escribiÃ:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>
> Thiago> This patch changes all methods of gdb.Block to attributes,
> Thiago> since they are very simple.
>
> These renamings seem good to me.
Great, thanks for the review.
> Thiago> - { "itersymbols", blpy_itersymbols, METH_NOARGS,
> Thiago> - "Return an iterator to walk through the symbols in the block." },
>
> This probably should not be an attribute. And, you probably didn't
> intend to remove it.
Right, it was an oversight. Good thing that you spotted it.
But now that I think of it, I'm not sure why I added the method in the
first place. The iterator can be used without an explicit call to this
method, by directly using gdb.Block in a for or in statement. Or even by
explicitly calling gdb.Block.__iter__. I'm inclined to remove
"itersymbols", what do you think?
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center