summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-10-21 18:30:45 (GMT)
committerGitHub <noreply@github.com>2024-10-21 18:30:45 (GMT)
commit5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8 (patch)
treed4f4dc4e80de809d695247c749a3ac50340ef78e /Doc/library
parentde5a6c7c7d00ac37d66cba9849202b374e9cdfb7 (diff)
downloadcpython-5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8.zip
cpython-5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8.tar.gz
cpython-5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8.tar.bz2
gh-125767: Fix pickling and copying of super objects (GH-125781)
Previously, copying a super object returned a copy of the instance invoking super(). Pickling a super object could pickle the instance invoking super() or fail, depending on its type and protocol. Now deep copying returns a new super object and pickling pickles the super object. Shallow copying returns the same super object.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/functions.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 0638df0..290c638 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -2032,6 +2032,10 @@ are always available. They are listed here in alphabetical order.
:func:`super`, see `guide to using super()
<https://rhettinger.wordpress.com/2011/05/26/super-considered-super/>`_.
+ .. versionchanged:: 3.14
+ :class:`super` objects are now :mod:`pickleable <pickle>` and
+ :mod:`copyable <copy>`.
+
.. _func-tuple:
.. class:: tuple()