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 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):

View File

@ -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():

View File

@ -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

View File

@ -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

View File

@ -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