simple example of calling a class
class myKlass(object):
def __call__(self, *args, **kws):
print "i was called"
>> test = myKlass()
>> test()
>> i was called
>
>
>
> On Wed, Jul 15, 2009 at 6:33 AM, Kent Johnson <[email protected]> wrote:
>
>> On Wed, Jul 15, 2009 at 7:41 AM, Todd Matsumoto<[email protected]>
>> wrote:
>> > Hi,
>> >
>> > Can some one give, or point to some good examples of how @decorators
>> work, and __call__ (able) objects?
>>
>> Decorators:
>> http://personalpages.tds.net/~kent37/kk/00001.html<http://personalpages.tds.net/%7Ekent37/kk/00001.html>
>>
>> Kent
>> _______________________________________________
>> Tutor maillist - [email protected]
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor