summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Delfino <adelfino@gmail.com>2019-05-20 21:52:17 -0300
committerCheryl Sabella <cheryl.sabella@gmail.com>2019-05-20 20:52:17 -0400
commit3099ae407541b63249657b971fb35ff217508d86 (patch)
treeb4514894c1c549d8a5af8335dd3e384898555f12
parent6220c02e09e9f3a7458d32ad774ada0ba1571cb8 (diff)
downloadcpython-git-3099ae407541b63249657b971fb35ff217508d86.tar.gz
Remove workaround for defaults in namedtuple now that we have the defaults parameter (GH-13263)
-rw-r--r--Doc/library/collections.rst9
1 files changed, 0 insertions, 9 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index e0469c2081..ae21db216f 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('<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