summaryrefslogtreecommitdiffstats
path: root/Lib/heapq.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-06-15 21:40:18 (GMT)
committerRaymond Hettinger <python@rcn.com>2014-06-15 21:40:18 (GMT)
commit354bffaec46367313d308c229f16094be4f74b19 (patch)
tree4f265b279041d864466634b36bcdaeeb0825c5cc /Lib/heapq.py
parentbadf5d839d9174da126a326dc6e75374a0150d46 (diff)
downloadcpython-354bffaec46367313d308c229f16094be4f74b19.zip
cpython-354bffaec46367313d308c229f16094be4f74b19.tar.gz
cpython-354bffaec46367313d308c229f16094be4f74b19.tar.bz2
Update comment to reflect using the default parameter with min() and max().
Diffstat (limited to 'Lib/heapq.py')
-rw-r--r--Lib/heapq.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/heapq.py b/Lib/heapq.py
index 8fb3d09..258c0ba 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -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()