Andrei Kulakov <andrei....@gmail.com> added the comment:
I don't think it's incorrect right now, from the POV of internal data of the stream, there's 6 chars, from the POV of caller, 5 chars are read. So this can be interpreted as 2 chars are combined into 1 char read. On the other hand if TextIOBase was reading '\r' and letting caller process it and then reading '\n....' that would be of course a recipe to shoot the user in the foot, and would require a warning in big red letters in the docs. (Or even better fixing it to do what it does now.) ---------- nosy: +andrei.avk _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43336> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com