]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 20 Nov 2020 21:19:49 +0000 (13:19 -0800)
committerGitHub <noreply@github.com>
Fri, 20 Nov 2020 21:19:49 +0000 (13:19 -0800)
Doc/library/collections.rst

index 549ac1bccadf5de92349b7c46a180326a33ced69..2ffdb49dbe6da80c7a06c3c0ed9e1051d537e718 100644 (file)
@@ -849,6 +849,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*.