Created
March 23, 2020 20:43
-
-
Save kokjo/3f3fd4ad3597ac0c1b283551d02b2499 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
class A(type): | |
def __new__(cls, clsname, bases, attrs): | |
print cls, clsname, bases, attrs | |
newclass = super(A, cls).__new__(cls, clsname, bases, attrs) | |
return newclass | |
class B(object): | |
__metaclass__ = A | |
class C(B): pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment