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

eliben at gmail.com eliben at gmail.com
Sat Jun 8 18:18:42 CEST 2013

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

Doc/library/enum.rst:240: of *_sunder_* names, *__dunder__* names, and
descriptors; methods are
The specific rules are not well-enough defined. sunder names are
forbidden, dunders are not - is this explained elsewhere?

Doc/library/enum.rst:245: methods.
This needs some more explanation and/or example, perhaps somewhere in
the end in "advanced customization"

Doc/library/enum.rst:260: But this is allowed::
Can this have a sensical example? (like, some simple example of where
this actually makes sense)

Doc/library/enum.rst:280: A variation of :class:`Enum` is proposed which
is also a subclass of :class:`int`.
80 col

Doc/library/enum.rst:331: Other derived enumerations
I think this should be merged somehow with the "interesting examples",
perhaps in a higher-level header: "Creating custom enumerations" with
some dry explanation of the semantics, followed by examples. And this
should definitely be the last section of the document :-)

Doc/library/enum.rst:340: This demonstrates how similar derived
enumerations can be defined, for example
; instead of , after "defined" ?

Doc/library/enum.rst:443: ...                     )
just append this to the previous line

File Lib/enum.py (right):

Lib/enum.py:42: """Returns True if a sunder name, False otherwise."""
Unlike "dunder", "sunder" has no historical meaning for python
programmers. I suggest a more consistent documentation then, like:

"Returns True if a __dunder__ name, False otherwise"
"Returns True if a _sunder_ name, False otherwise"


More information about the docs mailing list