Created
January 20, 2010 12:53
-
-
Save lprsd/281820 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> class x(object): | |
| ... def __call__(self): | |
| ... print "Hello, World!" | |
| ... | |
| >>> x() | |
| <__main__.x object at 0x9a5a1ac> | |
| >>> x()() | |
| Hello, World! | |
| >>> type(x) | |
| <type 'type'> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment