This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2020年05月07日 16:37 by Rémy Oudompheng, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (1) | |||
|---|---|---|---|
| msg368355 - (view) | Author: Rémy Oudompheng (Rémy Oudompheng) | Date: 2020年05月07日 16:37 | |
When running "2to3 -f raise" on the following code, which uses an old Python 2.4 raise of a string:
def f():
raise ("message %s %s" % (1, 2))
try:
f()
finally:
pass
I obtain the following quite surprising result. I would have expected to get either an error or leave the original file unchanged, because "raise (s)" is syntactically valid although incorrect.
$ 2to3 -f raise w.py
RefactoringTool: Refactored w.py
--- w.py (original)
+++ w.py (refactored)
@@ -1,5 +1,5 @@
def f():
- raise ("message %s %s" % (1, 2))
+ raise "message %s %s"
try:
f()
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:30 | admin | set | github: 84727 |
| 2021年10月20日 22:55:32 | iritkatriel | set | status: open -> closed superseder: Close 2to3 issues and list them here resolution: wont fix stage: resolved |
| 2020年05月08日 21:41:34 | terry.reedy | set | nosy:
+ benjamin.peterson |
| 2020年05月07日 16:37:14 | Rémy Oudompheng | create | |