diff options
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r-- | Lib/test/test_itertools.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 8492484..cf0ca24 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -1419,9 +1419,9 @@ Samuele ... "Return function(0), function(1), ..." ... return map(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" |