Kelly Brazil <kellyjonbra...@gmail.com> 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') - str.splitlines() For sake of consistency it seems that sys.stdin on non-Windows should use the Universal Newlines behavior. Since the difference in behavior is not documented, it is safe to assume users can be confused by this difference. Also, unless there is a technical reason for the difference, I'm not sure what the rationale would be to keep the behavior different. All types of data can be piped to STDIN on non-Windows systems. Just because the pipeline is happening on unix/linux doesn't mean the data inside conforms to \n newlines. I believe Universal Newlines should be the default (as with the other scenarios) and the user should be able to decide if another newline option should be configured. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45617> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com