Gabriel Genellina wrote: > On 8 feb, 05:51, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > > > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > > > > > Surely you meant to say getattr(obj, a)() > > > > Yeah, darn. Counterintuitive. > > A generic function helps on using it on objects of any kind - like > len() > Perhaps it was more important with old style classes.
It also avoids intruding on the method namespace of the object. That's important -- I like the way that the namespace of a brand-new class is a blank slate, apart from the double-underscore names. -- Greg -- http://mail.python.org/mailman/listinfo/python-list