From: Andre Delfino Date: Tue, 21 May 2019 00:52:17 +0000 (-0300) Subject: Remove workaround for defaults in namedtuple now that we have the defaults parameter... X-Git-Tag: v3.8.0b1~279 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3099ae407541b63249657b971fb35ff217508d86;p=thirdparty%2FPython%2Fcpython.git Remove workaround for defaults in namedtuple now that we have the defaults parameter (GH-13263) --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index e0469c208100..ae21db216fde 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -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('', 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