bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429)
This commit is contained in:
parent
4dd2112a1d
commit
f552f4b2d6
|
@ -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
|
Named tuple instances do not have per-instance dictionaries, so they are
|
||||||
lightweight and require no more memory than regular tuples.
|
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
|
.. versionchanged:: 3.1
|
||||||
Added support for *rename*.
|
Added support for *rename*.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue