You're viewing a comment by AP2 and its responses.

AP2 Permalink
August 06, 2011, 23:24

Python does - you just need to implement the __call__ method:

class MyClass:
    def __call__(self):
        print "hello"

obj = MyClass()
obj() #prints "hello"

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cloud_219": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.