[Python-checkins] cpython: Update comment to reflect using the default parameter with min() and max().

raymond.hettinger python-checkins at python.org
Sun Jun 15 23:40:23 CEST 2014


http://hg.python.org/cpython/rev/4b0775631ebb
changeset: 91186:4b0775631ebb
user: Raymond Hettinger <python at rcn.com>
date: Sun Jun 15 14:40:18 2014 -0700
summary:
 Update comment to reflect using the default parameter with min() and max().
files:
 Lib/heapq.py | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/heapq.py b/Lib/heapq.py
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -464,7 +464,7 @@
 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 @@
 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()
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /