[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-11-01 Thread Kelly Brazil
Kelly Brazil added the comment: Are there other scenarios where splitlines behavior deviates from the default of newline=None (Universal Newlines)? It seems sys.stdin (on non-Windows OS) is the outlier. All of these use Universal Newlines: - sys.stdin (on Windows) - open(0, 'r

[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-27 Thread Kelly Brazil
Kelly Brazil added the comment: Also, I believe this docstring is being inherited, but this is also where it seems that '\r' is documented to work with sys.stdin: >>> print(sys.stdin.__doc__) Character and line based layer over a BufferedIOBase object, buffer. encoding gives

[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-27 Thread Kelly Brazil
Kelly Brazil added the comment: '\r' support is implicitly documented under the sys.stdin section[0]: "These streams are regular text files like those returned by the open() function. Their parameters are chosen as follows..." By following the link to the open()[1] docs, it says:

[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-26 Thread Kelly Brazil
Change by Kelly Brazil : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue45617> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-26 Thread Kelly Brazil
New submission from Kelly Brazil : When iterating on sys.stdin lines, '\r\n' and '\n' are handled correctly, but '\r' is not handled, though it is documented that it should be supported. Example code: import sys for line in sys.stdin: print(repr(line)) Results in Python 3.8.9: $ echo -e