diff options
-rw-r--r-- | Doc/lib/libitertools.tex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libitertools.tex b/Doc/lib/libitertools.tex index 4f025e3..d17fc6f 100644 --- a/Doc/lib/libitertools.tex +++ b/Doc/lib/libitertools.tex @@ -348,15 +348,15 @@ from building blocks. >>> def all(pred, seq): ... "Returns True if pred(x) is True for every element in the iterable" -... return not nth(ifilterfalse(pred, seq), 0) +... return False not in imap(pred, seq) >>> def some(pred, seq): ... "Returns True if pred(x) is True at least one element in the iterable" -... return bool(nth(ifilter(pred, seq), 0)) +... return True in imap(pred, seq) >>> def no(pred, seq): ... "Returns True if pred(x) is False for every element in the iterable" -... return not nth(ifilter(pred, seq), 0) +... return True not in imap(pred, seq) >>> def padnone(seq): ... "Returns the sequence elements and then returns None indefinitely" |