Serhiy Storchaka added the comment: Actually the behavior of the print statement in Python 2 is more complex.
"print x," doesn't output a space after x, but sets the softspace attribute of the file to true (unless x is a string ending with non-space whitespace character like \n or \t). print tests this flag before outputting a value and outputs a space if it is true. Any output to a file resets this flag. This behavior can't be exactly reproduced in Python 3. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com