diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-03 23:54:49 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-03 23:54:49 (GMT) |
commit | 4e9afdca392668bc7e07c79d8af0f95ef497fba4 (patch) | |
tree | 1d5fe4e4a32f838e7ae7189c49a7ae42fc139f51 /Misc | |
parent | 6aebded915ac3ca6dcd99ea4bf3dfc47a31bab1e (diff) | |
download | cpython-4e9afdca392668bc7e07c79d8af0f95ef497fba4.zip cpython-4e9afdca392668bc7e07c79d8af0f95ef497fba4.tar.gz cpython-4e9afdca392668bc7e07c79d8af0f95ef497fba4.tar.bz2 |
Generalize map() to work with iterators.
NEEDS DOC CHANGES.
Possibly contentious: The first time s.next() yields StopIteration (for
a given map argument s) is the last time map() *tries* s.next(). That
is, if other sequence args are longer, s will never again contribute
anything but None values to the result, even if trying s.next() again
could yield another result. This is the same behavior map() used to have
wrt IndexError, so it's the only way to be wholly backward-compatible.
I'm not a fan of letting StopIteration mean "try again later" anyway.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -19,6 +19,7 @@ Core arguments: filter() list() + map() max() min() |