This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python][rfc] Change gdb.Block to use attributes instead ofgetter methods.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]