summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_itertools.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 81a052b862..9eb138954d 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -1401,9 +1401,9 @@ Samuele
... "Return function(0), function(1), ..."
... return imap(function, count(start))
->>> def nth(iterable, n):
-... "Returns the nth item or None"
-... return next(islice(iterable, n, None), None)
+>>> def nth(iterable, n, default=None):
+... "Returns the nth item or a default value"
+... return next(islice(iterable, n, None), default)
>>> def quantify(iterable, pred=bool):
... "Count how many times the predicate is true"