summaryrefslogtreecommitdiff
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-11-28 01:45:15 -0800
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-11-28 01:45:15 -0800
commita61478a71b97c6ed6ea2b7c0463bd8686836e94b (patch)
tree9a23940556aebce5c06930ef903ed8c34b5284a6 /Doc/reference/datamodel.rst
parent574ed39413ce1d0dff5f9482d87f40e2709e2d91 (diff)
parent33e4d0f7af99a85fa55ce0a4917e8087c954af62 (diff)
downloadcpython-a61478a71b97c6ed6ea2b7c0463bd8686836e94b.tar.gz
Merge from 3.3: Add a str class entry to the string section (issue #16209).
This commit also moves the documentation for the str built-in function to the new class entry. Links to :class:`str` now go to the class entry with the string methods immediately afterwards.
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 25ec2d63de..9a39eb416a 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