Skip to content

Commit f552f4b

Browse files
bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429)
1 parent 4dd2112 commit f552f4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/collections.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,9 @@ they add the ability to access fields by name instead of position index.
849849
Named tuple instances do not have per-instance dictionaries, so they are
850850
lightweight and require no more memory than regular tuples.
851851

852+
To support pickling, the named tuple class should be assigned to a variable
853+
that matches *typename*.
854+
852855
.. versionchanged:: 3.1
853856
Added support for *rename*.
854857

0 commit comments

Comments
 (0)