Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions Lib/_collections_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ def __subclasshook__(cls, C):


class Set(Collection):

"""A set is a finite, iterable container.

This class provides concrete generic implementations of all
Expand Down Expand Up @@ -657,17 +656,15 @@ def __isub__(self, it):


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
Expand Down Expand Up @@ -789,18 +786,16 @@ def __iter__(self):


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
Expand Down Expand Up @@ -879,7 +874,6 @@ def setdefault(self, key, default=None):


class Sequence(Reversible, Collection):

"""All the operations on a read-only sequence.

Concrete subclasses must override __new__ or __init__,
Expand Down Expand Up @@ -947,7 +941,6 @@ def count(self, value):


class ByteString(Sequence):

"""This unifies bytes and bytearray.

XXX Should add all their methods.
Expand All @@ -960,16 +953,14 @@ class ByteString(Sequence):


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
Expand Down