diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-01 20:45:31 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-01 20:45:31 (GMT) |
commit | f553f89d45f049e32f5eadc0c78a1e2440745d7a (patch) | |
tree | 085e1bcc3a073a4faac1e6cf32e88354142b2994 /Misc | |
parent | 47668928e6f02713a1fbd27b434b08b08ca75d1b (diff) | |
download | cpython-f553f89d45f049e32f5eadc0c78a1e2440745d7a.zip cpython-f553f89d45f049e32f5eadc0c78a1e2440745d7a.tar.gz cpython-f553f89d45f049e32f5eadc0c78a1e2440745d7a.tar.bz2 |
Generalize list(seq) to work with iterators. This also generalizes list()
to no longer insist that len(seq) be defined.
NEEDS DOC CHANGES.
This is meant to be a model for how other functions of this ilk (max,
filter, etc) can be generalized similarly. Feel encouraged to grab your
favorite and convert it!
Note some cute consequences:
list(file) == file.readlines() == list(file.xreadlines())
list(dict) == dict.keys()
list(dict.iteritems()) = dict.items()
list(xrange(i, j, k)) == range(i, j, k)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,13 @@ +What's New in Python 2.2a0? +=========================== + +Core + +- The following functions were generalized to work nicely with iterator + arguments: + list() + + What's New in Python 2.1 (final)? ================================= |