changing __call__ on demand

Alan McIntyre alan.mcintyre at esrgtech.com
Sun Feb 13 15:45:07 EST 2005


Thanks; I didn't read close enough. :)

-- 
Alan McIntyre
ESRG LLC
http://www.esrgtech.com

Michael Hoffman wrote:
> 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.



More information about the Python-list mailing list