summaryrefslogtreecommitdiffstats
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-08 01:49:35 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-02-08 01:49:35 (GMT)
commit46988d365946f2b61812b6ff60cb557e036fa6b1 (patch)
tree098caa6c1c32d409086693146136028d29d4805a /Doc/library/enum.rst
parenta0fcaca4e1c29078f578fb96971398c70cf38900 (diff)
parentd5db14794bdeb4646ede5881aed43dd1838ffe7a (diff)
downloadcpython-46988d365946f2b61812b6ff60cb557e036fa6b1.zip
cpython-46988d365946f2b61812b6ff60cb557e036fa6b1.tar.gz
cpython-46988d365946f2b61812b6ff60cb557e036fa6b1.tar.bz2
Merge string formatting doc fixes from 3.5
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 1fa6e73..333adfc 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -555,12 +555,12 @@ Some rules:
3. When another data type is mixed in, the :attr:`value` attribute is *not the
same* as the enum member itself, although it is equivalent and will compare
equal.
-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. :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.
+4. %-style formatting: `%s` and `%r` call the :class:`Enum` class'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. :meth:`str.format` (or :func:`format`) will use the mixed-in
+ type's :meth:`__format__`. If the :class:`Enum` class's :func:`str` or
+ :func:`repr` is desired, use the `!s` or `!r` format codes.
Interesting examples