[Python-Dev] version compare function into main lib

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 27 12:20:34 CET 2009

anatoly techtonik wrote:

> Correct me if I wrong, but shouldn't Python include function for
> version comparisons?

Can't you just compare sys.version_info tuples?

 >>> sys.version_info
(2, 5, 0, 'final', 0)

Assuming the other possibilities for 'final' are
'alpha' and 'beta', these should compare in the
right order.


More information about the Python-Dev mailing list