summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-08-16 17:55:43 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-08-16 17:55:43 (GMT)
commit6538b430cfa3b076da2f9320bb86aaa3c3c7bcf5 (patch)
treeab705c5a5f2fd6c4b275b038570ccb85e3d54396 /Doc/library/collections.rst
parent3ee933f1c34755bb210e23942d22649a0c38bd23 (diff)
downloadcpython-6538b430cfa3b076da2f9320bb86aaa3c3c7bcf5.zip
cpython-6538b430cfa3b076da2f9320bb86aaa3c3c7bcf5.tar.gz
cpython-6538b430cfa3b076da2f9320bb86aaa3c3c7bcf5.tar.bz2
Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only.
Diffstat (limited to 'Doc/library/collections.rst')
-rw-r--r--Doc/library/collections.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 4503a07..a6c9be6 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -763,7 +763,7 @@ Named tuples assign meaning to each position in a tuple and allow for more reada
self-documenting code. They can be used wherever regular tuples are used, and
they add the ability to access fields by name instead of position index.
-.. function:: namedtuple(typename, field_names, verbose=False, rename=False)
+.. function:: namedtuple(typename, field_names, *, verbose=False, rename=False)
Returns a new tuple subclass named *typename*. The new subclass is used to
create tuple-like objects that have fields accessible by attribute lookup as
@@ -799,7 +799,11 @@ they add the ability to access fields by name instead of position index.
a namedtuple.
.. versionchanged:: 3.1
- Added support for *rename*.
+ Added support for *rename*.
+
+ .. versionchanged:: 3.6
+ The *verbose* and *rename* parameters became
+ :ref:`keyword-only arguments <keyword-only_parameter>`.
.. doctest::