Remove __metaclass__ remains.
This commit is contained in:
parent
7626235633
commit
e81f5ef1eb
|
@ -85,8 +85,8 @@ class EiffelMetaClass2(EiffelBaseMetaClass):
|
||||||
make_eiffel_method = EiffelDescriptor
|
make_eiffel_method = EiffelDescriptor
|
||||||
|
|
||||||
def _test(metaclass):
|
def _test(metaclass):
|
||||||
class Eiffel:
|
class Eiffel(metaclass=metaclass):
|
||||||
__metaclass__ = metaclass
|
pass
|
||||||
|
|
||||||
class Test(Eiffel):
|
class Test(Eiffel):
|
||||||
|
|
||||||
|
|
|
@ -82,11 +82,11 @@ class EnumInstance(int):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "%s.%s" % (self.__classname, self.__enumname)
|
return "%s.%s" % (self.__classname, self.__enumname)
|
||||||
|
|
||||||
class Enum:
|
class Enum(metaclass=EnumMetaclass):
|
||||||
__metaclass__ = EnumMetaclass
|
pass
|
||||||
|
|
||||||
class FullEnum:
|
class FullEnum(metaclass=FullEnumMetaclass):
|
||||||
__metaclass__ = FullEnumMetaclass
|
pass
|
||||||
|
|
||||||
def _test():
|
def _test():
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
|
||||||
self.assertEqual(a[100:200], (100,200))
|
self.assertEqual(a[100:200], (100,200))
|
||||||
|
|
||||||
def test_metaclass(self):
|
def test_metaclass(self):
|
||||||
# Testing __metaclass__...
|
# Testing metaclasses...
|
||||||
class C(metaclass=type):
|
class C(metaclass=type):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__state = 0
|
self.__state = 0
|
||||||
|
|
|
@ -10,8 +10,6 @@ browser.
|
||||||
Changes for Python: Add support for module versions
|
Changes for Python: Add support for module versions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#__metaclass__ = type
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
|
@ -96,8 +96,8 @@ class ModuleMetaclass(BaseMetaclass):
|
||||||
|
|
||||||
p("}")
|
p("}")
|
||||||
|
|
||||||
class Module:
|
class Module(metaclass=ModuleMetaclass):
|
||||||
__metaclass__ = ModuleMetaclass
|
pass
|
||||||
|
|
||||||
class TypeMetaclass(BaseMetaclass):
|
class TypeMetaclass(BaseMetaclass):
|
||||||
|
|
||||||
|
@ -211,5 +211,5 @@ class TypeMetaclass(BaseMetaclass):
|
||||||
p(template.type_init_type)
|
p(template.type_init_type)
|
||||||
p(template.module_add_type)
|
p(template.module_add_type)
|
||||||
|
|
||||||
class Type:
|
class Type(metaclass=TypeMetaclass):
|
||||||
__metaclass__ = TypeMetaclass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue