summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-11-23 19:17:25 (GMT)
committerGeorg Brandl <georg@python.org>2008-11-23 19:17:25 (GMT)
commit061d2e2ee9f5853560bc1dde2d71311a373202a3 (patch)
tree7618213bea67938e0c5e7170e3cbfa36df28bd43
parent75bfcbaf888241b53926a87efa26e084b6a2d78e (diff)
downloadcpython-061d2e2ee9f5853560bc1dde2d71311a373202a3.zip
cpython-061d2e2ee9f5853560bc1dde2d71311a373202a3.tar.gz
cpython-061d2e2ee9f5853560bc1dde2d71311a373202a3.tar.bz2
#4392: fix parameter name.
-rw-r--r--Doc/library/collections.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 258b54f..4a0714e 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -487,16 +487,16 @@ 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, fieldnames, [verbose])
+.. function:: namedtuple(typename, field_names, [verbose])
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
well as being indexable and iterable. Instances of the subclass also have a
- helpful docstring (with typename and fieldnames) and a helpful :meth:`__repr__`
+ helpful docstring (with typename and field_names) and a helpful :meth:`__repr__`
method which lists the tuple contents in a ``name=value`` format.
- The *fieldnames* are a single string with each fieldname separated by whitespace
- and/or commas, for example ``'x y'`` or ``'x, y'``. Alternatively, *fieldnames*
+ The *field_names* are a single string with each fieldname separated by whitespace
+ and/or commas, for example ``'x y'`` or ``'x, y'``. Alternatively, *field_names*
can be a sequence of strings such as ``['x', 'y']``.
Any valid Python identifier may be used for a fieldname except for names