mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
Note default values for namedtuple extra args.
This commit is contained in:
parent
92e6972c53
commit
27fa482afd
1 changed files with 1 additions and 1 deletions
|
@ -566,7 +566,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
|
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.
|
they add the ability to access fields by name instead of position index.
|
||||||
|
|
||||||
.. function:: namedtuple(typename, field_names, [verbose], [rename])
|
.. function:: namedtuple(typename, field_names, [verbose=False], [rename=False])
|
||||||
|
|
||||||
Returns a new tuple subclass named *typename*. The new subclass is used to
|
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
|
create tuple-like objects that have fields accessible by attribute lookup as
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue