Remove __metaclass__ remains.

This commit is contained in:
Georg Brandl 2008-05-27 20:34:09 +00:00
parent 7626235633
commit e81f5ef1eb
5 changed files with 11 additions and 13 deletions

View File

@ -85,8 +85,8 @@ class EiffelMetaClass2(EiffelBaseMetaClass):
make_eiffel_method = EiffelDescriptor
def _test(metaclass):
class Eiffel:
__metaclass__ = metaclass
class Eiffel(metaclass=metaclass):
pass
class Test(Eiffel):

View File

@ -82,11 +82,11 @@ class EnumInstance(int):
def __str__(self):
return "%s.%s" % (self.__classname, self.__enumname)
class Enum:
__metaclass__ = EnumMetaclass
class Enum(metaclass=EnumMetaclass):
pass
class FullEnum:
__metaclass__ = FullEnumMetaclass
class FullEnum(metaclass=FullEnumMetaclass):
pass
def _test():

View File

@ -440,7 +440,7 @@ class ClassPropertiesAndMethods(unittest.TestCase):
self.assertEqual(a[100:200], (100,200))
def test_metaclass(self):
# Testing __metaclass__...
# Testing metaclasses...
class C(metaclass=type):
def __init__(self):
self.__state = 0

View File

@ -10,8 +10,6 @@ browser.
Changes for Python: Add support for module versions
"""
#__metaclass__ = type
import os
import sys
import traceback

View File

@ -96,8 +96,8 @@ class ModuleMetaclass(BaseMetaclass):
p("}")
class Module:
__metaclass__ = ModuleMetaclass
class Module(metaclass=ModuleMetaclass):
pass
class TypeMetaclass(BaseMetaclass):
@ -211,5 +211,5 @@ class TypeMetaclass(BaseMetaclass):
p(template.type_init_type)
p(template.module_add_type)
class Type:
__metaclass__ = TypeMetaclass
class Type(metaclass=TypeMetaclass):
pass