changing __call__ on demand

Michael Hoffman cam.ac.uk at mh391.invalid
Sun Feb 13 12:12:30 EST 2005


Alan McIntyre wrote:
> >>>class test(object):
> ...    def __call1(self):
> ...        print 1
> ...    __call__ = __call1
> Is that what you were looking for?

That still only allows him to have one call function per class.
-- 
Michael Hoffman



More information about the Python-list mailing list