The "loop and a half"

bartc bc at freeuk.com
Fri Oct 6 16:01:56 EDT 2017


On 06/10/2017 20:38, Grant Edwards wrote:
> On 2017-10-06, bartc <bc at freeuk.com> wrote:
> 
>> For sort, there is no real need. You use a text editor to create
>> your data. Then use existing file-based sort.
> 
> I sort streams on stdin far more often than I sort named files.

So what's been established is that 'sort' is useful for a text stream 
that already exists as a file or is the output of another process.

What hasn't been established is why how this works this has to influence 
the design of simple text-based dialogues, real ones where there will 
likely be an actual user tapping the keys in real time.

The only tenuous connection I can see, is that if 'sort' is run without 
any piped or redirected input, it will resort to the keyboard. Even 
though that method is not user-friendly and hardly anyone ever uses it 
in that mode. So that same unfriendly technique should be the model for 
text dialogues everywhere.

-- 
bartc



More information about the Python-list mailing list