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
optparse.py:1668: (file) shadows builtin #70152
Comments
I use pychecker for checking my python code. Seems optparse.py distributed with python-2.7 could be improved as well: [system path]/optparse.py:1191: Function (init) has too many arguments (11) Interestingly, my version variable is overridden by one from optparse.py. But more worrisome is the 'file' variable name. |
None of this warnings highlights a real issue. Furthermore, optparse module is deprecated and you'd be better off using argparse instead. |
But couldn't somebody just rename the variable for example to _file? I see optparse also in python-3.5 so I did not think it could be Deprecated. |
The deprecation warning is clearly displayed at the top of the module documentation: https://docs.python.org/3/library/optparse.html Regarding variable names: it is not an issue and pychecker is simply mistaken here. |
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: