Created
December 8, 2013 23:49
-
-
Save markrwilliams/7865287 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
>>> A.mro() | |
[<class '__main__.A'>, <type 'object'>] | |
>>> B.mro() | |
[<class '__main__.B'>, <type 'object'>] | |
>>> set.mro() | |
[<type 'set'>, <type 'object'>] | |
>>> dict.mro() | |
[<type 'dict'>, <type 'object'>] | |
>>> class C(A, B): pass | |
... | |
>>> C.mro() | |
[<class '__main__.C'>, <class '__main__.A'>, <class '__main__.B'>, <type 'object'>] | |
>>> class C(set, dict): pass | |
... | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
TypeError: Error when calling the metaclass bases | |
multiple bases have instance lay-out conflict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment