How to get a directory list sorted by date?

Grant Edwards grant.b.edwards at gmail.com
Sun May 15 12:00:03 EDT 2016


On 2016-05-15, Michael Selik <michael.selik at gmail.com> wrote:
> On Sun, May 15, 2016, 10:37 AM Grant Edwards <grant.b.edwards at gmail.com> wrote:
>> On 2016-05-15, Tim Chase <python.list at tim.thechases.com> wrote:
>>>
>>> unless sorted() returns a lazy sorter,
>>
>> What's a lazy sorter?
>
> One that doesn't calculate the next item in the sequence until you
> ask for it. It's impossible

Why?  As long as the function has access to the entire sequence, it
should be trivial.  Just find the min (or max) item in the sequence,
remove it, then return it.  It's horribly inefficient, but...

> unless you don't mind an approximation rather than correct sort.

I have a feeling that I've missed the joke somewhere.

-- 
Grant





More information about the Python-list mailing list