[Python-checkins] r52668 - python/trunk/Doc/lib/libheapq.tex

georg.brandl python-checkins at python.org
Wed Nov 8 11:04:30 CET 2006


Author: georg.brandl
Date: Wed Nov 8 11:04:29 2006
New Revision: 52668
Modified:
 python/trunk/Doc/lib/libheapq.tex
Log:
Bug #1592533: rename variable in heapq doc example, to avoid shadowing
"sorted".
Modified: python/trunk/Doc/lib/libheapq.tex
==============================================================================
--- python/trunk/Doc/lib/libheapq.tex	(original)
+++ python/trunk/Doc/lib/libheapq.tex	Wed Nov 8 11:04:29 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

AltStyle によって変換されたページ (->オリジナル) /