summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2013-06-29 02:37:17 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2013-06-29 02:37:17 (GMT)
commite2563462fcef08f0e1ce6f6b02e5a0a6c1d92937 (patch)
treeb6a8a8d3461bccbbd3fd3f2f25fe615c7456bbba /Doc
parentb1c68274cee4e4262f5e5a2fb2786554df138862 (diff)
downloadcpython-e2563462fcef08f0e1ce6f6b02e5a0a6c1d92937.zip
cpython-e2563462fcef08f0e1ce6f6b02e5a0a6c1d92937.tar.gz
cpython-e2563462fcef08f0e1ce6f6b02e5a0a6c1d92937.tar.bz2
Added rationale for defaulting to 1 in the functional API.
Diffstat (limited to 'Doc')
-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 8979181..b919bdc 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