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

Cheryl Sabella webhook-mailer at python.org
Sat May 18 20:18:09 EDT 2019


https://github.com/python/cpython/commit/9892f454d11b7ea9ba394a115b3e6f48ef6f78fe
commit: 9892f454d11b7ea9ba394a115b3e6f48ef6f78fe
branch: master
author: Jelle Zijlstra <jelle.zijlstra at gmail.com>
committer: Cheryl Sabella <cheryl.sabella at gmail.com>
date: 2019-05-18T20:17:56-04:00
summary:

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

files:
A Misc/NEWS.d/next/Documentation/2018-05-17-21-02-00.bpo-33519.Q7s2FB.rst
M Doc/library/stdtypes.rst

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 53337291dd39..293a1ab6a0d9 100644
--- a/Doc/library/stdtypes.rst
+++ b/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.
diff --git a/Misc/NEWS.d/next/Documentation/2018-05-17-21-02-00.bpo-33519.Q7s2FB.rst b/Misc/NEWS.d/next/Documentation/2018-05-17-21-02-00.bpo-33519.Q7s2FB.rst
new file mode 100644
index 000000000000..0ee6c0d5f8ea
--- /dev/null
+++ b/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.



More information about the Python-checkins mailing list