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

This commit is contained in:
Andre Delfino 2019-05-20 21:52:17 -03:00 committed by Cheryl Sabella
parent 6220c02e09
commit 3099ae4075
1 changed files with 0 additions and 9 deletions

View File

@ -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