[Python-ideas] os.listdir iteration support
Guido van Rossum
guido at python.org
Fri Nov 23 02:40:45 CET 2007
On Nov 22, 2007 3:25 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> "Giampaolo Rodola'" <gnewsg at gmail.com> wrote
> > I would find very useful having a version of os.listdir returning a
> > generator.
>
> If there are no technical issues in the way, such a replacement (rather
> than addition) would be in line with other list -> iterator replacements in
> 3.0 (range, dict,items, etc). A list could then be obtained with
> list(os.listdir).
But how common is this use case really?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-ideas
mailing list