Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9892f45

Browse files
JelleZijlstracsabella
authored andcommitted
bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965)
1 parent da6129e commit 9892f45

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ Notes:
11141114
item is removed and returned.
11151115

11161116
(3)
1117-
``remove`` raises :exc:`ValueError` when *x* is not found in *s*.
1117+
:meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*.
11181118

11191119
(4)
11201120
The :meth:`reverse` method modifies the sequence in place for economy of
@@ -1124,7 +1124,9 @@ Notes:
11241124
(5)
11251125
:meth:`clear` and :meth:`!copy` are included for consistency with the
11261126
interfaces of mutable containers that don't support slicing operations
1127-
(such as :class:`dict` and :class:`set`)
1127+
(such as :class:`dict` and :class:`set`). :meth:`!copy` is not part of the
1128+
:class:`collections.abc.MutableSequence` ABC, but most concrete
1129+
mutable sequence classes provide it.
11281130

11291131
.. versionadded:: 3.3
11301132
:meth:`clear` and :meth:`!copy` methods.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify that `copy()` is not part of the `MutableSequence` ABC.

0 commit comments

Comments
 (0)