Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com