Eryk Sun added the comment:
The limit of 512 characters is not for sys.stdin in general. It's for
io._WindowsConsoleIO, which gets used as the raw file for non-redirected
sys.stdin -- and opening "CON" and "CONIN$" -- if legacy mode isn't enabled.
See bpo-41849.
--
nosy: +eryksun
re
New submission from Andrey Moiseev :
sys.stdin.readline() in Windows console only allows 512 characters on input per
line. So large pastes are truncated at 512 chars, which is a bit inconvenient
for prototyping.
The buffer size seems to be determined by BUFSIZ compile time constant:
https://g