Created
February 25, 2014 14:59
-
-
Save dstufft/9210459 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
| >>> def __one__(self): | |
| ... pass | |
| ... | |
| >>> class Foo: | |
| ... __two__ = __one__ | |
| ... def __three__(self): | |
| ... pass | |
| ... | |
| >>> Foo.__four__ = __one__ | |
| >>> obj = Foo() | |
| >>> obj.__five__ = __one__ | |
| >>> type(__one__) | |
| <class 'function'> | |
| >>> type(Foo.__two__) | |
| <class 'function'> | |
| >>> type(Foo.__three__) | |
| <class 'function'> | |
| >>> type(Foo.__four__) | |
| <class 'function'> | |
| >>> type(obj.__two__) | |
| <class 'method'> | |
| >>> type(obj.__three__) | |
| <class 'method'> | |
| >>> type(obj.__four__) | |
| <class 'method'> | |
| >>> type(obj.__five__) | |
| <class 'function'> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment