summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/bisect.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst
index 6b3f7e8..3890d68 100644
--- a/Doc/library/bisect.rst
+++ b/Doc/library/bisect.rst
@@ -77,8 +77,8 @@ Instead, it is better to search a list of precomputed keys to find the index
of the record in question::
>>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
- >>> data.sort(key=lambda r: r[1]) # precomputed list of keys
- >>> keys = [r[1] for r in data]
+ >>> data.sort(key=lambda r: r[1])
+ >>> keys = [r[1] for r in data] # precomputed list of keys
>>> data[bisect_left(keys, 0)]
('black', 0)
>>> data[bisect_left(keys, 1)]