Commit 3099ae40 authored by Andre Delfino's avatar Andre Delfino Committed by Cheryl Sabella

Remove workaround for defaults in namedtuple now that we have the defaults parameter (GH-13263)

parent 6220c02e
......@@ -1017,15 +1017,6 @@ fields:
.. versionchanged:: 3.5
Property docstrings became writeable.
Default values can be implemented by using :meth:`~somenamedtuple._replace` to
customize a prototype instance:
>>> Account = namedtuple('Account', 'owner balance transaction_count')
>>> default_account = Account('<owner name>', 0.0, 0)
>>> johns_account = default_account._replace(owner='John')
>>> janes_account = default_account._replace(owner='Jane')
.. seealso::
* See :class:`typing.NamedTuple` for a way to add type hints for named
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment