[Python-checkins] bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429)
rhettinger
webhook-mailer at python.org
Fri Nov 20 16:19:54 EST 2020
https://github.com/python/cpython/commit/f552f4b2d635ae031e154374ba3a609c63d09d2b
commit: f552f4b2d635ae031e154374ba3a609c63d09d2b
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2020-11-20T13:19:49-08:00
summary:
bpo-42360: Add advice to help avoid pickling issues. (GH-23305) (GH-23429)
files:
M Doc/library/collections.rst
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 549ac1bccadf5..2ffdb49dbe6da 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -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*.
More information about the Python-checkins
mailing list