summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-11-10 08:00:17 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-11-10 08:00:17 (GMT)
commit5bfb9f0b1f131859b03fde418efd5aca9a7bb85c (patch)
tree2ab3df7a3a2eb6d45d0f0de17e8fc15161a2cb30 /Doc/library/collections.rst
parent608f472a854e74d21af7febd932b7befef50719c (diff)
parent549e34cc7bb5af347512c9feae1b917f5fb65479 (diff)
downloadcpython-5bfb9f0b1f131859b03fde418efd5aca9a7bb85c.zip
cpython-5bfb9f0b1f131859b03fde418efd5aca9a7bb85c.tar.gz
cpython-5bfb9f0b1f131859b03fde418efd5aca9a7bb85c.tar.bz2
merge
Diffstat (limited to 'Doc/library/collections.rst')
-rw-r--r--Doc/library/collections.rst10
1 files changed, 0 insertions, 10 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 30193ee..b60dd79 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -942,16 +942,6 @@ customize a prototype instance:
>>> johns_account = default_account._replace(owner='John')
>>> janes_account = default_account._replace(owner='Jane')
-Enumerated constants can be implemented with named tuples, but it is simpler
-and more efficient to use a simple :class:`~enum.Enum`:
-
- >>> Status = namedtuple('Status', 'open pending closed')._make(range(3))
- >>> Status.open, Status.pending, Status.closed
- (0, 1, 2)
- >>> from enum import Enum
- >>> class Status(Enum):
- ... open, pending, closed = range(3)
-
.. seealso::