]> granicus.if.org Git - python/commitdiff
Update comment to reflect using the default parameter with min() and max().
authorRaymond Hettinger <python@rcn.com>
Sun, 15 Jun 2014 21:40:18 +0000 (14:40 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 15 Jun 2014 21:40:18 +0000 (14:40 -0700)
Lib/heapq.py

index 8fb3d0921c2f769eaf6ddf7bdc4d202d4a2e72da..258c0baeb62de0b63e3c357a5ad2f5da78ab084e 100644 (file)
@@ -464,7 +464,7 @@ def nsmallest(n, iterable, key=None):
     Equivalent to:  sorted(iterable, key=key)[:n]
     """
 
-    # Short-cut for n==1 is to use min() when len(iterable)>0
+    # Short-cut for n==1 is to use min()
     if n == 1:
         it = iter(iterable)
         sentinel = object()
@@ -527,7 +527,7 @@ def nlargest(n, iterable, key=None):
     Equivalent to:  sorted(iterable, key=key, reverse=True)[:n]
     """
 
-    # Short-cut for n==1 is to use max() when len(iterable)>0
+    # Short-cut for n==1 is to use max()
     if n == 1:
         it = iter(iterable)
         sentinel = object()