6 lines
210 B
Python
6 lines
210 B
Python
|
def with_metaclass(meta, *bases):
|
||
|
class metaclass(meta):
|
||
|
def __new__(cls, name, this_bases, d):
|
||
|
return meta(name, bases, d)
|
||
|
return type.__new__(metaclass, 'temporary_class', (), {})
|