__call__

TK merman at o2online.de
Sat May 28 13:16:28 EDT 2005


>>>>class Test(object):
> 
> ...     def __call__(self):
> ...         print "the instance was called"
> ...
> 
>>>>t = Test()
>>>>t()
> 
> the instance was called
> 
> Is this what you wanted?

Yeah! Thanks.



More information about the Python-list mailing list