Commit ac056151 authored by Georg Brandl's avatar Georg Brandl

Bug #1592533: rename variable in heapq doc example, to avoid shadowing

"sorted".
 (backport from rev. 52668)
parent 928eabdf
...@@ -76,14 +76,14 @@ Example of use: ...@@ -76,14 +76,14 @@ Example of use:
>>> for item in data: >>> for item in data:
... heappush(heap, item) ... heappush(heap, item)
... ...
>>> sorted = [] >>> ordered = []
>>> while heap: >>> while heap:
... sorted.append(heappop(heap)) ... ordered.append(heappop(heap))
... ...
>>> print sorted >>> print ordered
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> data.sort() >>> data.sort()
>>> print data == sorted >>> print data == ordered
True True
>>> >>>
\end{verbatim} \end{verbatim}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment