summaryrefslogtreecommitdiff
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2013-06-28 19:37:17 -0700
committerEthan Furman <ethan@stoneleaf.us>2013-06-28 19:37:17 -0700
commit9963ac120fab14605cd68f65c4e1a70474b81203 (patch)
tree7f69ac282cc606a0f325e3801fba03b8d206ef3c /Doc/library/enum.rst
parent4a69816624cf93ff79a0bcfa2ecc800952e48fee (diff)
downloadcpython-9963ac120fab14605cd68f65c4e1a70474b81203.tar.gz
Added rationale for defaulting to 1 in the functional API.
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 89791819f6..b919bdc839 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -335,6 +335,10 @@ assignment to :class:`Animal` is equivalent to::
... cat = 3
... dog = 4
+The reason for defaulting to ``1`` as the starting number and not ``0`` is
+that ``0`` is ``False`` in a boolean sense, but enum members all evaluate
+to ``True``.
+
Pickling enums created with the functional API can be tricky as frame stack
implementation details are used to try and figure out which module the
enumeration is being created in (e.g. it will fail if you use a utility