Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e2197a48
Commit
e2197a48
authored
Jun 07, 2014
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Plain Diff
Merge issue #21667 from 3.4
parents
f2d95263
1462786f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
Doc/reference/datamodel.rst
Doc/reference/datamodel.rst
+10
-9
No files found.
Doc/reference/datamodel.rst
View file @
e2197a48
...
@@ -285,16 +285,17 @@ Sequences
...
@@ -285,16 +285,17 @@ Sequences
single: integer
single: integer
single: Unicode
single: Unicode
A string is a sequence of values that represent Unicode codepoints.
A string is a sequence of values that represent Unicode code points.
All the codepoints in range ``U+0000 - U+10FFFF`` can be represented
All the code points in the range ``U+0000 - U+10FFFF`` can be
in a string. Python doesn't have a :c:type:`chr` type, and
represented in a string. Python doesn't have a :c:type:`char` type;
every character in the string is represented as a string object
instead, every code point in the string is represented as a string
with length ``1``. The built-in function :func:`ord` converts a
object with length ``1``. The built-in function :func:`ord`
character to its codepoint (as an integer); :func:`chr` converts
converts a code point from its string form to an integer in the
an integer in range ``0 - 10FFFF`` to the corresponding character.
range ``0 - 10FFFF``; :func:`chr` converts an integer in the range
``0 - 10FFFF`` to the corresponding length ``1`` string object.
:meth:`str.encode` can be used to convert a :class:`str` to
:meth:`str.encode` can be used to convert a :class:`str` to
:class:`bytes` using the given
encoding, and :meth:`bytes.decode` can
:class:`bytes` using the given
text encoding, and
be used to achieve the opposite.
:meth:`bytes.decode` can
be used to achieve the opposite.
Tuples
Tuples
.. index::
.. index::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment