Why doesn't Python include non-blocking keyboard input function?

BartC bc at freeuk.com
Sat Oct 29 11:41:43 EDT 2016


On 29/10/2016 15:53, Chris Angelico wrote:
> On Sun, Oct 30, 2016 at 1:32 AM, BartC <bc at freeuk.com> wrote:
>> BTW the functionality of my 'readln a,b,c' differs from the above.
>> Separators can be anything reasonable. When eol is encountered, it will read
>> zeros. And errors are not handled: any non-numeric will yield zero.
>
> People will disagree as to what is "correct behaviour" in that kind of
> situation. If someone disagrees with Steve's function, s/he can write
> a different one. If someone disagrees with your language primitive....
> s/he can write a different language?

No, they use a function similar to Steve's. Or just tweak the code: read 
an item as a string instead of a number. Then its validity can checked.

This sounds like another one of those arguments: there's no point in 
having a simple feature A, because it doesn't do X, Y and Z.

So we won't have it. But do we instead have feature B that includes X, Y 
and Z? No, of course not! No matter that 90% of the time, X, Y and Z are 
never used...

-- 
Bartc





More information about the Python-list mailing list