[Python-checkins] r52669 - python/branches/release25-maint/Doc/lib/libheapq.tex
georg.brandl
python-checkins at python.org
Wed Nov 8 11:04:33 CET 2006
Author: georg.brandl
Date: Wed Nov 8 11:04:32 2006
New Revision: 52669
Modified:
python/branches/release25-maint/Doc/lib/libheapq.tex
Log:
Bug #1592533: rename variable in heapq doc example, to avoid shadowing
"sorted".
(backport from rev. 52668)
Modified: python/branches/release25-maint/Doc/lib/libheapq.tex
==============================================================================
--- python/branches/release25-maint/Doc/lib/libheapq.tex (original)
+++ python/branches/release25-maint/Doc/lib/libheapq.tex Wed Nov 8 11:04:32 2006
@@ -76,14 +76,14 @@
>>> for item in data:
... heappush(heap, item)
...
->>> sorted = []
+>>> ordered = []
>>> while heap:
-... sorted.append(heappop(heap))
+... ordered.append(heappop(heap))
...
->>> print sorted
+>>> print ordered
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> data.sort()
->>> print data == sorted
+>>> print data == ordered
True
>>>
\end{verbatim}
More information about the Python-checkins
mailing list