This repository was archived by the owner on Feb 4, 2024. It is now read-only.
This repository was archived by the owner on Feb 4, 2024. It is now read-only.
string comparison with sys.version
(python3.10) #4
Closed
Description
I haven't seen this one in the wild, but I think it's ~reasonably well defined for 3.0 - 3.9 so it's possible:
Python 3.5.7 (default, Mar 30 2019, 01:05:18)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version >= '3.5'
True
Python 3.10.0a0 (default, Jul 18 2019, 06:46:14)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version >= '3.5'
False