[docs] Code, test, and doc review for PEP-0435 Enum (issue 17947)

zachary.ware at gmail.com zachary.ware at gmail.com
Mon Jun 10 07:00:12 CEST 2013

A few nitpicks and a suggestion.  Everything else looks good to me.

File Doc/library/enum.rst (right):

Doc/library/enum.rst:60: Enums also have a property that contains just
their item name::
Conflict with the note on nomenclature above; should be 'Enum members

Doc/library/enum.rst:314: >>> Animals = Enum('Animals', 'ant bee cat
dog', module=__name__)
This bit about pickling should be at the end of this section (just as
the 'module' argument is last in the call).

Doc/library/enum.rst:337: A variation of :class:`Enum` is proposed which
is also a subclass of

Doc/library/enum.rst:423: One frequent request is to not have to specify
values for enum members::
The obvious thing that comes to mind when reading "One frequent request"
or "Some have asked...", etc., is "Then why are these not provided in
the module?"  I wonder if it might be better to wrap these examples up
into a demo file for Tools/demo, and shorten this section to "Some
interesting Enum subclasses can be found in the Tools/demo folder of
your Python installation or source distribution."

Alternately, I'd advise finding a different wording, though I
unfortunately can't come up with any myself.

File Lib/test/test_enum.py (right):

Lib/test/test_enum.py:474: _reserved_ = 0
This test is covered by test_invalid_names above.


More information about the docs mailing list