This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2004年03月09日 14:13 by ragnark, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg54112 - (view) | Author: Ragnar Kjørstad (ragnark) | Date: 2004年03月09日 14:13 | |
The current implementation of map() and filter() returns a list when executed on any iterator, including generators. However, it may be very useful to map and filter the output from generators without having to generate all the data and allocate memory for it. I would propose for map() and filter() to return a generator-object instead of a list when the input-argument is a generator. |
|||
| msg54113 - (view) | Author: Tim Peters (tim.peters) * (Python committer) | Date: 2004年03月09日 20:11 | |
Logged In: YES user_id=31435 It's (far) too late to change the signature of map() and filter (). Look in the itertools module instead: its ifilter() and imap () functions already do what you asked for (and more). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:03 | admin | set | github: 40015 |
| 2004年03月09日 14:13:35 | ragnark | create | |