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

eric.araujo python-checkins at python.org
Wed Apr 27 16:37:35 CEST 2011


http://hg.python.org/cpython/rev/e0205b4a0807
changeset:   69597:e0205b4a0807
branch:      3.1
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
@@ -172,7 +172,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,
@@ -363,7 +363,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):
@@ -401,7 +401,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