diff options
author | Julien Palard <julien@palard.fr> | 2020-11-17 21:50:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 21:50:23 (GMT) |
commit | 282282a1c9347adbd07a2d59c2b861df7580cebb (patch) | |
tree | d297ad93e5559a6f8086bcebccf1131f92f4f82e /Lib/_collections_abc.py | |
parent | 2a9eddf070f72060f62db1856a0af2e08729a46c (diff) | |
download | cpython-282282a1c9347adbd07a2d59c2b861df7580cebb.zip cpython-282282a1c9347adbd07a2d59c2b861df7580cebb.tar.gz cpython-282282a1c9347adbd07a2d59c2b861df7580cebb.tar.bz2 |
Fix: Docstrings hidden by slots. (GH-23352)
Some `__slots__` where before the docstring, hiding them.
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r-- | Lib/_collections_abc.py | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 36cd993..28690f8 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -430,7 +430,6 @@ class Callable(metaclass=ABCMeta): class Set(Collection): - """A set is a finite, iterable container. This class provides concrete generic implementations of all @@ -657,17 +656,15 @@ MutableSet.register(set) class Mapping(Collection): - - __slots__ = () - """A Mapping is a generic container for associating key/value pairs. This class provides concrete generic implementations of all methods except for __getitem__, __iter__, and __len__. - """ + __slots__ = () + @abstractmethod def __getitem__(self, key): raise KeyError @@ -789,18 +786,16 @@ ValuesView.register(dict_values) class MutableMapping(Mapping): - - __slots__ = () - """A MutableMapping is a generic container for associating key/value pairs. This class provides concrete generic implementations of all methods except for __getitem__, __setitem__, __delitem__, __iter__, and __len__. - """ + __slots__ = () + @abstractmethod def __setitem__(self, key, value): raise KeyError @@ -879,7 +874,6 @@ MutableMapping.register(dict) class Sequence(Reversible, Collection): - """All the operations on a read-only sequence. Concrete subclasses must override __new__ or __init__, @@ -947,7 +941,6 @@ Sequence.register(memoryview) class ByteString(Sequence): - """This unifies bytes and bytearray. XXX Should add all their methods. @@ -960,16 +953,14 @@ ByteString.register(bytearray) class MutableSequence(Sequence): - - __slots__ = () - """All the operations on a read-write sequence. Concrete subclasses must provide __new__ or __init__, __getitem__, __setitem__, __delitem__, __len__, and insert(). - """ + __slots__ = () + @abstractmethod def __setitem__(self, index, value): raise IndexError |