[Python-checkins] cpython (2.7): Minor tweaks to a few comments in heapq

eric.araujo python-checkins at python.org
Mon May 2 13:39:08 CEST 2011


http://hg.python.org/cpython/rev/6e4f446835da
changeset:   69766:6e4f446835da
branch:      2.7
user:        Éric Araujo <merwok at netwok.org>
date:        Fri Apr 15 23:34:31 2011 +0200
summary:
  Minor tweaks to a few comments in heapq

files:
  Lib/heapq.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/heapq.py b/Lib/heapq.py
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -178,7 +178,7 @@
     return item
 
 def heapify(x):
-    """Transform list into a heap, in-place, in O(len(heap)) time."""
+    """Transform list into a heap, in-place, in O(len(x)) time."""
     n = len(x)
     # Transform bottom-up.  The largest index there's any point to looking at
     # is the largest with a child index in-range, so must have 2*i + 1 < n,
@@ -368,7 +368,7 @@
             return [min(chain(head, it))]
         return [min(chain(head, it), key=key)]
 
-    # When n>=size, it's faster to use sort()
+    # When n>=size, it's faster to use sorted()
     try:
         size = len(iterable)
     except (TypeError, AttributeError):
@@ -406,7 +406,7 @@
             return [max(chain(head, it))]
         return [max(chain(head, it), key=key)]
 
-    # When n>=size, it's faster to use sort()
+    # When n>=size, it's faster to use sorted()
     try:
         size = len(iterable)
     except (TypeError, AttributeError):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list