[Python-checkins] cpython: Close issue20412: Updated Enum docs to have referencable Enum and IntEnum

ethan.furman python-checkins at python.org
Thu Feb 6 17:13:13 CET 2014


http://hg.python.org/cpython/rev/eeb582c0c014
changeset:   88995:eeb582c0c014
user:        Ethan Furman <ethan at stoneleaf.us>
date:        Thu Feb 06 08:13:14 2014 -0800
summary:
  Close issue20412: Updated Enum docs to have referencable Enum and IntEnum classes

files:
  Doc/library/enum.rst |  27 ++++++++++++++++++++++-----
  1 files changed, 22 insertions(+), 5 deletions(-)


diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -15,14 +15,31 @@
 
 ----------------
 
-An enumeration is a set of symbolic names (members) bound to unique, constant
-values.  Within an enumeration, the members can be compared by identity, and
-the enumeration itself can be iterated over.
+An enumeration is a set of symbolic names (members) bound to unique,
+constant values.  Within an enumeration, the members can be compared
+by identity, and the enumeration itself can be iterated over.
+
+
+Module Contents
+---------------
 
 This module defines two enumeration classes that can be used to define unique
 sets of names and values: :class:`Enum` and :class:`IntEnum`.  It also defines
-one decorator, :func:`unique`, that ensures only unique member values are
-present in an enumeration.
+one decorator, :func:`unique`.
+
+.. class:: Enum
+
+    Base class for creating enumerated constants.  See section
+    :ref:`Functional API` for an alternate construction syntax.
+
+.. class:: IntEnum
+
+    Base class for creating enumerated constants that are also
+    subclasses of :class:`int`.
+
+.. function:: unique
+
+    Enum class decorator that ensures only one name is bound to any one value.
 
 
 Creating an Enum

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list