summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEmmanuel Arias <emmanuelarias30@gmail.com>2019-04-02 04:52:42 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-04-02 04:52:42 (GMT)
commitb00479d42aaaed589d8b374bf5e5c6f443b0b499 (patch)
tree9138aa2a4d91f6f51c2cfd40187ca4be17fa0b54 /Doc
parent9139f926a8d8e5b71830cb7e10b0807836b5e9a4 (diff)
downloadcpython-b00479d42aaaed589d8b374bf5e5c6f443b0b499.zip
cpython-b00479d42aaaed589d8b374bf5e5c6f443b0b499.tar.gz
cpython-b00479d42aaaed589d8b374bf5e5c6f443b0b499.tar.bz2
bpo-36377: Specify that range() can not be compared (GH-12468)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/datastructures.rst23
1 files changed, 11 insertions, 12 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index b4db3f0..01e437b 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -678,18 +678,17 @@ intended.
Comparing Sequences and Other Types
===================================
-
-Sequence objects may be compared to other objects with the same sequence type.
-The comparison uses *lexicographical* ordering: first the first two items are
-compared, and if they differ this determines the outcome of the comparison; if
-they are equal, the next two items are compared, and so on, until either
-sequence is exhausted. If two items to be compared are themselves sequences of
-the same type, the lexicographical comparison is carried out recursively. If
-all items of two sequences compare equal, the sequences are considered equal.
-If one sequence is an initial sub-sequence of the other, the shorter sequence is
-the smaller (lesser) one. Lexicographical ordering for strings uses the Unicode
-code point number to order individual characters. Some examples of comparisons
-between sequences of the same type::
+Sequence objects typically may be compared to other objects with the same sequence
+type. The comparison uses *lexicographical* ordering: first the first two
+items are compared, and if they differ this determines the outcome of the
+comparison; if they are equal, the next two items are compared, and so on, until
+either sequence is exhausted. If two items to be compared are themselves
+sequences of the same type, the lexicographical comparison is carried out
+recursively. If all items of two sequences compare equal, the sequences are
+considered equal. If one sequence is an initial sub-sequence of the other, the
+shorter sequence is the smaller (lesser) one. Lexicographical ordering for
+strings uses the Unicode code point number to order individual characters.
+Some examples of comparisons between sequences of the same type::
(1, 2, 3) < (1, 2, 4)
[1, 2, 3] < [1, 2, 4]