Message348240
I think it is better to left this on third-party linters.
* It is easy to catch patterns like `sys.version_info[0] == 3` or `sys.version[:3]` in the linter than in the Python compiler or interpreter. Linters are designed for this.
* Not always slicing sys.version is an error. For example, `sys.version[:sys.version.index(' ')]` is a valid code. Linters have options which allow to ignore some kind of warnings or warnings at the particular line.
* Users that ignore linters usually do not check the version. They wrote their scripts for the default system Python and update them when they become broken after system upgrade. |
|
Date |
User |
Action |
Args |
2019-07-21 12:19:29 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, ncoghlan, scoder, ezio.melotti, josh.r, Anthony Sottile |
2019-07-21 12:19:29 | serhiy.storchaka | set | messageid: <1563711569.04.0.708868927848.issue37636@roundup.psfhosted.org> |
2019-07-21 12:19:29 | serhiy.storchaka | link | issue37636 messages |
2019-07-21 12:19:28 | serhiy.storchaka | create | |
|