[Python-checkins] bpo-42360: Add advice to help avoid pickling issues. (GH-23305)

rhettinger webhook-mailer at python.org
Fri Nov 20 15:49:37 EST 2020


https://github.com/python/cpython/commit/9fc319dc033fa32d298fe1c3f171b3d011ac04f0
commit: 9fc319dc033fa32d298fe1c3f171b3d011ac04f0
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2020-11-20T12:49:32-08:00
summary:

bpo-42360: Add advice to help avoid pickling issues. (GH-23305)

files:
M Doc/library/collections.rst

diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index f538da5e1c9fa..1293f542b0437 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -862,6 +862,9 @@ they add the ability to access fields by name instead of position index.
     Named tuple instances do not have per-instance dictionaries, so they are
     lightweight and require no more memory than regular tuples.
 
+    To support pickling, the named tuple class should be assigned to a variable
+    that matches *typename*.
+
     .. versionchanged:: 3.1
        Added support for *rename*.
 



More information about the Python-checkins mailing list