]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42360: Add advice to help avoid pickling issues. (GH-23305)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 20 Nov 2020 20:49:32 +0000 (12:49 -0800)
committerGitHub <noreply@github.com>
Fri, 20 Nov 2020 20:49:32 +0000 (12:49 -0800)
Doc/library/collections.rst

index f538da5e1c9faafb79beed073bfc915abc039b87..1293f542b04377e15e662355c0ddb07e5a2c6b35 100644 (file)
@@ -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*.