Author bers
Recipients bers
Date 2019-02-26.11:51:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551181873.79.0.208082027128.issue36122@roundup.psfhosted.org>
In-reply-to
Content
I did this on Windows 10:

P:\>python --version
Python 3.7.2

P:\>echo print 1, 2 > Test.py

P:\>python Test.py
  File "Test.py", line 1
    print 1, 2
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(1, 2)?

P:\>2to3 -w Test.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored Test.py
--- Test.py     (original)
+++ Test.py     (refactored)
@@ -1 +1 @@
-print 1, 2
+print(1, 2)
RefactoringTool: Files that were modified:
RefactoringTool: Test.py

P:\>python Test.py
1 2

P:\>2to3 -w Test.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored Test.py
--- Test.py     (original)
+++ Test.py     (refactored)
@@ -1 +1 @@
-print(1, 2)
+print((1, 2))
RefactoringTool: Files that were modified:
RefactoringTool: Test.py

P:\>python Test.py
(1, 2)

Note how "print 1, 2" first becomes "print(1, 2)" (expected), then becomes "print((1, 2))" in the following run. This changes the output of Test.py
History
Date User Action Args
2019-02-26 11:51:13berssetrecipients: + bers
2019-02-26 11:51:13berssetmessageid: <1551181873.79.0.208082027128.issue36122@roundup.psfhosted.org>
2019-02-26 11:51:13berslinkissue36122 messages
2019-02-26 11:51:13berscreate