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

Skip to content

Commit e2197a4

Browse files
committed
Merge issue #21667 from 3.4
2 parents f2d9526 + 1462786 commit e2197a4

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,17 @@ Sequences
285285
single: integer
286286
single: Unicode
287287

288-
A string is a sequence of values that represent Unicode codepoints.
289-
All the codepoints in range ``U+0000 - U+10FFFF`` can be represented
290-
in a string. Python doesn't have a :c:type:`chr` type, and
291-
every character in the string is represented as a string object
292-
with length ``1``. The built-in function :func:`ord` converts a
293-
character to its codepoint (as an integer); :func:`chr` converts
294-
an integer in range ``0 - 10FFFF`` to the corresponding character.
288+
A string is a sequence of values that represent Unicode code points.
289+
All the code points in the range ``U+0000 - U+10FFFF`` can be
290+
represented in a string. Python doesn't have a :c:type:`char` type;
291+
instead, every code point in the string is represented as a string
292+
object with length ``1``. The built-in function :func:`ord`
293+
converts a code point from its string form to an integer in the
294+
range ``0 - 10FFFF``; :func:`chr` converts an integer in the range
295+
``0 - 10FFFF`` to the corresponding length ``1`` string object.
295296
:meth:`str.encode` can be used to convert a :class:`str` to
296-
:class:`bytes` using the given encoding, and :meth:`bytes.decode` can
297-
be used to achieve the opposite.
297+
:class:`bytes` using the given text encoding, and
298+
:meth:`bytes.decode` can be used to achieve the opposite.
298299

299300
Tuples
300301
.. index::

0 commit comments

Comments
 (0)