Ulrich Eckhardt wrote:

> separate variable but iterated over it directly. For large dirs, it
> could also be better to use os.path.walk(), because that doesn't first
> build a list and then iterate over the list but iterates over the single
> elements directly. This avoids the memory allocation overhead, although
> it is unlikely to make a difference in this case and a Premature
> Optimization(tm).

Not true. os.walk() uses os.listdir() internally.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to