Created
September 30, 2010 16:11
-
-
Save snim2/604842 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 Foo: | |
| ... | |
| ... | |
| File "<stdin>", line 3 | |
| ^ | |
| IndentationError: expected an indented block | |
| >>> class Foo: | |
| ... def __init__(self): | |
| ... return | |
| ... | |
| >>> class Bar(object): | |
| ... def __init__(self): | |
| ... return | |
| ... | |
| >>> dir(Foo) | |
| ['__doc__', '__init__', '__module__'] | |
| >>> dir(Bar) | |
| ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__'] | |
| >>> f, b = Foo(), Bar() | |
| >>> dir(f) | |
| ['__doc__', '__init__', '__module__'] | |
| >>> dir(b) | |
| ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__'] | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment