Paul Ganssle <p.gans...@gmail.com> added the comment:
Because what's being printed is a tuple, I think it's not exactly the same as issue35417, because in fact this is the correct behavior for 2to3, note that in Python 2: Python 2.7.15 (default, Jul 21 2018, 11:13:03) >>> print 1, 2 1 2 >>> print(1, 2) (1, 2) And in Python 3: Python 3.7.2 (default, Feb 9 2019, 13:18:43) >>> print(1, 2) 1 2 >>> print((1, 2)) (1, 2) I think this bug report is based on an understandable misunderstanding of what 2to3 does - 2to3 is not intended to be idempotent or to generate code the works for both Python 2 and Python 3, it's intended to translate Python 2 code into Python 3, so passing it something that is *already Python 3 code* you are not guaranteed to get a meaningful output from it. In this case, it first translates `print 1, 2` (Python 2) into `print(1, 2)` (Python 3), then when you run it a second time, it translates `print(1, 2)` (Python 2) into `print((1, 2))` (Python 3) - in both cases it's doing the right thing. @bers I hope that this has helped to clarify the situation. Thank you for taking the time to report this. ---------- nosy: +p-ganssle _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36122> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com