From: Georg Brandl Date: Wed, 8 Nov 2006 10:04:32 +0000 (+0000) Subject: Bug #1592533: rename variable in heapq doc example, to avoid shadowing X-Git-Tag: v2.5.1c1~263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ed5c2a277fcc2da2b52aa923e32d267e4be0dd5;p=python Bug #1592533: rename variable in heapq doc example, to avoid shadowing "sorted". (backport from rev. 52668) --- diff --git a/Doc/lib/libheapq.tex b/Doc/lib/libheapq.tex index eaf7051b41..5f3d8c598a 100644 --- a/Doc/lib/libheapq.tex +++ b/Doc/lib/libheapq.tex @@ -76,14 +76,14 @@ Example of use: >>> 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}