Skip to content

Instantly share code, notes, and snippets.

@markrwilliams
Created December 8, 2013 23:49
Show Gist options
  • Save markrwilliams/7865287 to your computer and use it in GitHub Desktop.
Save markrwilliams/7865287 to your computer and use it in GitHub Desktop.
>>> 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