mirror of https://github.com/python/cpython
Note default values for namedtuple extra args.
This commit is contained in:
parent
92e6972c53
commit
27fa482afd
|
@ -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…
Reference in New Issue