summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r--Doc/reference/datamodel.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 25ec2d6..9a39eb4 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -274,11 +274,13 @@ Sequences
The following types are immutable sequences:
+ .. index::
+ single: string; immutable sequences
+
Strings
.. index::
builtin: chr
builtin: ord
- builtin: str
single: character
single: integer
single: Unicode
@@ -1188,14 +1190,14 @@ Basic customization
Called by :func:`bytes` to compute a byte-string representation of an
object. This should return a ``bytes`` object.
-
-.. method:: object.__format__(self, format_spec)
-
.. index::
+ single: string; __format__() (object method)
pair: string; conversion
- builtin: str
builtin: print
+
+.. method:: object.__format__(self, format_spec)
+
Called by the :func:`format` built-in function (and by extension, the
:meth:`str.format` method of class :class:`str`) to produce a "formatted"
string representation of an object. The ``format_spec`` argument is