changing __call__ on demand
Stefan Behnel
stefan.behnel-n05pAM at web.de
Sun Feb 13 12:33:06 EST 2005
Michael Hoffman schrieb:
> __call__, like __getitem__, and __getattr__ is called on the
> class object, not the instance object. So, no, not as far as I
> am aware, without using metaclass trickery. The simplest option
> IMO is to use another level of indirection as you suggest.
Thanks for the quick answer. I didn't know they were class-level methods. Too
bad. Guess I'll stick with indirection then.
Stefan
More information about the Python-list
mailing list