Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e312f4d

Browse files
committed
Merge from 3.3: Add and adjust some string-related links in the docs.
2 parents 23354f5 + c33899b commit e312f4d

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

Doc/library/functions.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,8 @@ are always available. They are listed here in alphabetical order.
12061206
.. function:: str(object='')
12071207
str(object[, encoding[, errors]])
12081208

1209-
Return a string version of an object, using one of the following modes:
1209+
Return a :ref:`string <textseq>` version of an object, using one of the
1210+
following modes:
12101211

12111212
If *encoding* and/or *errors* are given, :func:`str` will decode the
12121213
*object* which can either be a byte string or a character buffer using
@@ -1229,11 +1230,9 @@ are always available. They are listed here in alphabetical order.
12291230
Objects can specify what ``str(object)`` returns by defining a :meth:`__str__`
12301231
special method.
12311232

1232-
For more information on strings see :ref:`typesseq` which describes sequence
1233-
functionality (strings are sequences), and also the string-specific methods
1234-
described in the :ref:`string-methods` section. To output formatted strings,
1235-
see the :ref:`string-formatting` section. In addition see the
1236-
:ref:`stringservices` section.
1233+
For more information on strings and string methods, see the :ref:`textseq`
1234+
section. To output formatted strings, see the :ref:`string-formatting`
1235+
section. In addition, see the :ref:`stringservices` section.
12371236

12381237

12391238
.. function:: sum(iterable[, start])

Doc/library/stdtypes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,8 +1357,8 @@ Text Sequence Type --- :class:`str`
13571357
object: io.StringIO
13581358

13591359

1360-
Textual data in Python is handled with :class:`str` objects, which are
1361-
immutable sequences of Unicode code points. String literals are
1360+
Textual data in Python is handled with ``str`` objects, which are immutable
1361+
:ref:`sequences <typesseq>` of Unicode code points. String literals are
13621362
written in a variety of ways:
13631363

13641364
* Single quotes: ``'allows embedded "double" quotes'``
@@ -1376,8 +1376,8 @@ See :ref:`strings` for more about the various forms of string literal,
13761376
including supported escape sequences, and the ``r`` ("raw") prefix that
13771377
disables most escape sequence processing.
13781378

1379-
Strings may also be created from other objects with the :ref:`str <func-str>`
1380-
built-in.
1379+
Strings may also be created from other objects with the built-in
1380+
function :func:`str`.
13811381

13821382
Since there is no separate "character" type, indexing a string produces
13831383
strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``.

0 commit comments

Comments
 (0)