On 2016-05-15 14:36, Grant Edwards wrote:
> On 2016-05-15, Tim Chase <python.l...@tim.thechases.com> wrote:
> > unless sorted() returns a lazy sorter,
> 
> What's a lazy sorter?

A hypothetical algorithm that can spool out a sorted sequence without
holding the entire sequence in memory at the same time. 

Though I typed that initial reply a little quickly, as I hadn't known
at the time that scandir()'s results also provide stat() results with
reduced overhead (whereas listdir() just returns the filenames, so
you have to stat() each one).  Thanks, Peter, for highlighting this
feature.

So in light of my newfound knowledge, I humbly retract my snark and
agree that it's better to exploit scandir()'s inclusion of stat()
details without additional calls.

-tkc




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

Reply via email to