[issue41678] File-level, optionally external sorting

Platon workaccount report at bugs.python.org
Mon Aug 31 19:55:19 EDT 2020


Platon workaccount <platon.work at gmail.com> added the comment:

I mean Python's analog of sort [-k x.y] table.txt from GNU Coreutils.

>> What do you refer when you say "sorting a file"?

Sorting a file with multi-line plain text. Optionally, text consisting of
several columns separated by a specific character.

>> What does "key" act upon? Strings representing the lines in the file?

This is a sort rule argument similar to that of the existing in-memory
sort()/sorted() method.

>> For allow_disk_use=False, what's the difference between opening the
file, reading the lines, using sort() and writing the contents?

If False, there is no difference.

вт, 1 сент. 2020 г. в 00:18, Pablo Galindo Salgado <report at bugs.python.org>:

>
> Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
>
> What do you refer when you say "sorting a file"?
>
> What does "key" act upon? Strings representing the lines in the file?
>
> For allow_disk_use=False, what's the difference between opening the file,
> reading the lines, using sort() and writing the contents?
>
> ----------
> nosy: +pablogsal
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue41678>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41678>
_______________________________________


More information about the Python-bugs-list mailing list