On Jan 12, 9:47 pm, Mike Meyer <[EMAIL PROTECTED]>
wrote:
> The same way you call any object's methods if you know it's name":
>
> getattr(super_object, name)(*args, **kwargs)
Thanks a lot for your answer!
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?
Best regards,
-- Richard
--
http://mail.python.org/mailman/listinfo/python-list