Donald Stufft added the comment: @Benjamin
The reason I didn't do that to begin with, was the code currently checks if the first line is a bytes object or not in order to be able to raise an error if it's returning str instead of bytes. I didn't want to redo that check on every iteration, so I left the original part alone and then used the while loop to handle doing more if needed. Would you prefer the code written your way and either drop the bytes check or incur the cost of doing the type check on every line? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23801> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com