diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-02-08 01:34:09 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-08 01:34:09 (GMT) |
commit | d5db14794bdeb4646ede5881aed43dd1838ffe7a (patch) | |
tree | 867cd7b301dd19e4db74e191281398ae40d00782 /Doc/faq | |
parent | b6213c5664cf983ae67059a41520af1aaeeb52c3 (diff) | |
download | cpython-d5db14794bdeb4646ede5881aed43dd1838ffe7a.zip cpython-d5db14794bdeb4646ede5881aed43dd1838ffe7a.tar.gz cpython-d5db14794bdeb4646ede5881aed43dd1838ffe7a.tar.bz2 |
Issue #25179: Preparatory cleanup of existing docs on string formatting
* Various sections were pointing to the section on the string.Formatter
class, when the section on the common format string syntax is probably more
appropriate
* Fix references to various format() functions and methods
* Nested replacement fields may contain conversions and format specifiers,
and this is tested; see Issue #19729 for instance
Diffstat (limited to 'Doc/faq')
-rw-r--r-- | Doc/faq/programming.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 94b428d..9fba9fe 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -839,7 +839,7 @@ How do I convert a number to a string? To convert, e.g., the number 144 to the string '144', use the built-in type constructor :func:`str`. If you want a hexadecimal or octal representation, use the built-in functions :func:`hex` or :func:`oct`. For fancy formatting, see -the :ref:`string-formatting` section, e.g. ``"{:04d}".format(144)`` yields +the :ref:`formatstrings` section, e.g. ``"{:04d}".format(144)`` yields ``'0144'`` and ``"{:.3f}".format(1.0/3.0)`` yields ``'0.333'``. |