On Jan 13, 8:59 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 12 Jan 2008 14:23:52 -0800, Richard Szopa wrote: > > However, I am very surprised to learn that > > > super_object.__getattr__(name)(*args, **kwargs) > > > getattr(super_object, name)(*args, **kwargs) > > > are not equivalent. This is quite odd, at least when with len() > > and .__len__, str() and .__str__. Do you maybe know what's the > > rationale behind not following that convention by getattr? > > I think you are confusing `__getattr__` and `__getattribute__` here! > `getattr()` maps to `__getattr__()`, it's `__getattribute__` that's > different.
Well, in my code calling super_object.__getattr__(name)(*args, **kwargs) and getattr(super_object, name)(*args, **kwargs) gives *different* effects (namely, the latter works, while the former doesn't). That kinda suggests that they don't map to each other :-). And that makes me feel confused. Cheers, -- Richard -- http://mail.python.org/mailman/listinfo/python-list