On 20Dec2019 08:23, Chris Angelico wrote:
On Fri, Dec 20, 2019 at 8:06 AM Eli the Bearded <*@eli.users.panix.com> wrote:
Consider a sort that first compares file size and if the same number
of
bytes, then compares file checksum. Any decently scaled real world
implementation would memoize the c
Tony Flury via Python-list wrote:
>
> On 20/12/2019 18:59, Peter Otten wrote:
>> Chris Angelico wrote:
>>
>>> On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
PS: If you are sorting files by size and checksum as part of a
deduplication effort consider using dict-s i
On 20/12/2019 18:59, Peter Otten wrote:
Chris Angelico wrote:
On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
PS: If you are sorting files by size and checksum as part of a
deduplication effort consider using dict-s instead:
Yeah, I'd agree if that's the purpose. But l
On Sat, Dec 21, 2019 at 6:01 AM Peter Otten <__pete...@web.de> wrote:
>
> Chris Angelico wrote:
>
> > On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
> >> PS: If you are sorting files by size and checksum as part of a
> >> deduplication effort consider using dict-s instead:
>
Chris Angelico wrote:
> On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
>> PS: If you are sorting files by size and checksum as part of a
>> deduplication effort consider using dict-s instead:
>
> Yeah, I'd agree if that's the purpose. But let's say the point is to
> have a
On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
> PS: If you are sorting files by size and checksum as part of a deduplication
> effort consider using dict-s instead:
Yeah, I'd agree if that's the purpose. But let's say the point is to
have a guaranteed-stable ordering of fil
Eli the Bearded wrote:
> In comp.lang.python, Peter Otten <__pete...@web.de> wrote:
>> Eli the Bearded wrote:
>>> But what caught my eye most, as someone relatively new to Python but
>>> with long experience in C in Perl, is sorting doesn't take a
>
> s/C in /C and/
>
> Ugh.
>
>>> *comparison*
On Fri, Dec 20, 2019 at 8:06 AM Eli the Bearded <*@eli.users.panix.com> wrote:
>
> In comp.lang.python, Peter Otten <__pete...@web.de> wrote:
> > Eli the Bearded wrote:
> >> But what caught my eye most, as someone relatively new to Python but
> >> with long experience in C in Perl, is sorting does
In comp.lang.python, Peter Otten <__pete...@web.de> wrote:
> Eli the Bearded wrote:
>> But what caught my eye most, as someone relatively new to Python but
>> with long experience in C in Perl, is sorting doesn't take a
s/C in /C and/
Ugh.
>> *comparison* function, it takes a *key generator* fu
Eli the Bearded wrote:
> I recently saw a link to an old post on a blog and then started looking
> at the newer posts. This one:
>
> https://leancrew.com/all-this/2019/11/the-key-to-sorting-in-python/
>
> discusses ways to deal with useful sorting of movie / television show
> titles. Some initia
On Thu, Dec 19, 2019 at 6:36 PM Eli the Bearded <*@eli.users.panix.com> wrote:
>
> I recently saw a link to an old post on a blog and then started looking
> at the newer posts. This one:
>
> https://leancrew.com/all-this/2019/11/the-key-to-sorting-in-python/
>
> discusses ways to deal with useful s
On Thu, 19 Dec 2019 at 07:37, Eli the Bearded <*@eli.users.panix.com> wrote:
>
...
> But what caught my eye most, as someone relatively new to Python but
> with long experience in C in Perl, is sorting doesn't take a
> *comparison* function, it takes a *key generator* function, and that
> function
I recently saw a link to an old post on a blog and then started looking
at the newer posts. This one:
https://leancrew.com/all-this/2019/11/the-key-to-sorting-in-python/
discusses ways to deal with useful sorting of movie / television show
titles. Some initial words should be re-ordered for sorti
13 matches
Mail list logo