From: Ethan Furman Date: Mon, 9 Sep 2013 06:48:34 +0000 (-0700) Subject: Close #18980: Enum doc fixes. Patch from Elazar Gershuni. X-Git-Tag: v3.4.0a3~94^2~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=455bfdea2fd24e5b5f966860b9987fd6321dcde0;p=python Close #18980: Enum doc fixes. Patch from Elazar Gershuni. --- diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 3661469935..236275dc34 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -38,7 +38,8 @@ follows:: ... blue = 3 ... -..note: Nomenclature +.. note:: Nomenclature + - The class :class:`Color` is an *enumeration* (or *enum*) - The attributes :attr:`Color.red`, :attr:`Color.green`, etc., are *enumeration members* (or *enum members*). @@ -474,7 +475,7 @@ Some rules: 4. %-style formatting: `%s` and `%r` call :class:`Enum`'s :meth:`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or `%h` for IntEnum) treat the enum member as its mixed-in type. -5. :class:`str`.:meth:`__format__` (or :func:`format`) will use the mixed-in +5. :meth:`str.__format__` (or :func:`format`) will use the mixed-in type's :meth:`__format__`. If the :class:`Enum`'s :func:`str` or :func:`repr` is desired use the `!s` or `!r` :class:`str` format codes.