diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-18 08:20:22 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-18 08:20:22 +0000 |
commit | e7f4ede668029fb32a77d4092a2a723de499cdb4 (patch) | |
tree | 5f8536901406bb6767b24269c885d91f25b1ddf0 /Doc/library/stdtypes.rst | |
parent | 2eb11def8eb7dfd4f9a81db2115867abdfdaa287 (diff) | |
parent | 02b4dbb333f1afeed3d08399327b34c757184409 (diff) | |
download | cpython-e7f4ede668029fb32a77d4092a2a723de499cdb4.tar.gz |
Issue #24314: Merge doc links from 3.5
Diffstat (limited to 'Doc/library/stdtypes.rst')
-rw-r--r-- | Doc/library/stdtypes.rst | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index db1c2d0359..0ade1721e6 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1453,8 +1453,8 @@ multiple fragments. For more information on the ``str`` class and its methods, see :ref:`textseq` and the :ref:`string-methods` section below. To output - formatted strings, see the :ref:`formatstrings` section. In addition, - see the :ref:`stringservices` section. + formatted strings, see the :ref:`f-strings` and :ref:`formatstrings` + sections. In addition, see the :ref:`stringservices` section. .. index:: @@ -2056,8 +2056,8 @@ expression support in the :mod:`re` module). .. index:: single: formatting, string (%) single: interpolation, string (%) - single: string; formatting - single: string; interpolation + single: string; formatting, printf + single: string; interpolation, printf single: printf-style formatting single: sprintf-style formatting single: % formatting @@ -2067,9 +2067,10 @@ expression support in the :mod:`re` module). The formatting operations described here exhibit a variety of quirks that lead to a number of common errors (such as failing to display tuples and - dictionaries correctly). Using the newer :meth:`str.format` interface - helps avoid these errors, and also provides a generally more powerful, - flexible and extensible approach to formatting text. + dictionaries correctly). Using the newer :ref:`formatted + string literals <f-strings>` or the :meth:`str.format` interface + helps avoid these errors. These alternatives also provide more powerful, + flexible and extensible approaches to formatting text. String objects have one unique built-in operation: the ``%`` operator (modulo). This is also known as the string *formatting* or *interpolation* operator. |