Created
November 24, 2010 22:31
-
-
Save adh/714552 to your computer and use it in GitHub Desktop.
This file contains 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
Python 2.6.5+ (release26-maint, Jul 6 2010, 12:58:20) | |
[GCC 4.4.4] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> class Foo: | |
... def __call__(self): | |
... return self | |
... | |
>>> Foo() | |
<__main__.Foo instance at 0x7fea76c053f8> | |
>>> Foo() | |
<__main__.Foo instance at 0x7fea76c05488> | |
>>> foo = Foo() | |
>>> foo() | |
<__main__.Foo instance at 0x7fea76c053f8> | |
>>> foo() | |
<__main__.Foo instance at 0x7fea76c053f8> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment