Created
July 2, 2012 12:59
-
-
Save lvh/3033159 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 C1(object): | |
class __metaclass__(type): | |
def __new__(meta, name, bases, attrs): | |
attrs["sentinel"] = object() | |
return type(name, bases, attrs) | |
class C2(object): | |
class __metaclass__(type): | |
def __new__(meta, name, bases, attrs): | |
attrs["sentinel"] = object() | |
return type.__new__(meta, name, bases, attrs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment