Add a str class entry to the "Text Sequence Type" 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.
This commit is contained in:
Chris Jerdonek 2012-11-28 01:38:40 -08:00
parent 21602183ce
commit bb4e941c6d
6 changed files with 79 additions and 57 deletions

View file

@ -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.
.. index::
single: string; __format__() (object method)
pair: string; conversion
builtin: print
.. method:: object.__format__(self, format_spec)
.. index::
pair: string; conversion
builtin: str
builtin: print
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