Kaydet (Commit) 2cd9bf5e authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Metaclass declaration is inherited

üst 17a74c39
...@@ -57,7 +57,6 @@ Iterable.register(str) ...@@ -57,7 +57,6 @@ Iterable.register(str)
class Iterator(Iterable): class Iterator(Iterable):
__metaclass__ = ABCMeta
@abstractmethod @abstractmethod
def __next__(self): def __next__(self):
...@@ -123,8 +122,6 @@ class Callable: ...@@ -123,8 +122,6 @@ class Callable:
class Set(Sized, Iterable, Container): class Set(Sized, Iterable, Container):
__metaclass__ = ABCMeta
"""A set is a finite, iterable container. """A set is a finite, iterable container.
This class provides concrete generic implementations of all This class provides concrete generic implementations of all
...@@ -312,7 +309,6 @@ MutableSet.register(set) ...@@ -312,7 +309,6 @@ MutableSet.register(set)
class Mapping(Sized, Iterable, Container): class Mapping(Sized, Iterable, Container):
__metaclass__ = ABCMeta
@abstractmethod @abstractmethod
def __getitem__(self, key): def __getitem__(self, key):
...@@ -349,7 +345,6 @@ class Mapping(Sized, Iterable, Container): ...@@ -349,7 +345,6 @@ class Mapping(Sized, Iterable, Container):
return not (self == other) return not (self == other)
class MappingView(Sized): class MappingView(Sized):
__metaclass__ = ABCMeta
def __init__(self, mapping): def __init__(self, mapping):
self._mapping = mapping self._mapping = mapping
...@@ -469,8 +464,6 @@ MutableMapping.register(dict) ...@@ -469,8 +464,6 @@ MutableMapping.register(dict)
class Sequence(Sized, Iterable, Container): class Sequence(Sized, Iterable, Container):
__metaclass__ = ABCMeta
"""All the operations on a read-only sequence. """All the operations on a read-only sequence.
Concrete subclasses must override __new__ or __init__, Concrete subclasses must override __new__ or __init__,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment