From: Raymond Hettinger Date: Fri, 20 Nov 2020 20:49:32 +0000 (-0800) Subject: bpo-42360: Add advice to help avoid pickling issues. (GH-23305) X-Git-Tag: v3.10.0a3~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9fc319dc033fa32d298fe1c3f171b3d011ac04f0;p=thirdparty%2FPython%2Fcpython.git bpo-42360: Add advice to help avoid pickling issues. (GH-23305) --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index f538da5e1c9f..1293f542b043 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*.