Browse Source

bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965)

pull/13415/head
Jelle Zijlstra 7 years ago
committed by Cheryl Sabella
parent
commit
9892f454d1
  1. 6
      Doc/library/stdtypes.rst
  2. 1
      Misc/NEWS.d/next/Documentation/2018-05-17-21-02-00.bpo-33519.Q7s2FB.rst

6
Doc/library/stdtypes.rst

@ -1114,7 +1114,7 @@ Notes:
item is removed and returned.
(3)
``remove`` raises :exc:`ValueError` when *x* is not found in *s*.
:meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*.
(4)
The :meth:`reverse` method modifies the sequence in place for economy of
@ -1124,7 +1124,9 @@ Notes:
(5)
:meth:`clear` and :meth:`!copy` are included for consistency with the
interfaces of mutable containers that don't support slicing operations
(such as :class:`dict` and :class:`set`)
(such as :class:`dict` and :class:`set`). :meth:`!copy` is not part of the
:class:`collections.abc.MutableSequence` ABC, but most concrete
mutable sequence classes provide it.
.. versionadded:: 3.3
:meth:`clear` and :meth:`!copy` methods.

1
Misc/NEWS.d/next/Documentation/2018-05-17-21-02-00.bpo-33519.Q7s2FB.rst

@ -0,0 +1 @@
Clarify that `copy()` is not part of the `MutableSequence` ABC.
Loading…
Cancel
Save