New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2to3 fix_renames renames sys.maxint only in imports #57462
Comments
$ cat deleteme.py
from sys import maxint
print 'maxint', maxint
$ 2to3 deleteme.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored deleteme.py
--- deleteme.py (original)
+++ deleteme.py (refactored)
@@ -1,2 +1,2 @@
-from sys import maxint
-print 'maxint', maxint
+from sys import maxsize
+print('maxint', maxint)
RefactoringTool: Files that need to be modified:
RefactoringTool: deleteme.py The maxint in the print should be converted too. |
Do people really import maxint from sys? I’d find that less readable than using sys.maxint —which should, if you ask me, also be replaced :) |
I do (or at least did it in at least one place :). |
I'm interesting to research this. |
I'm close to solution, but I need another 1 week. |
Nikita, did you manage to find a solution? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: