[Python-Dev] New functionality in micro releases(was:Documenting branch policy) (original) (raw)

Matthew F. Barnes mfb at lotusland.dyndns.org
Tue Sep 9 02:25:11 EDT 2003


Fred L. Drake, Jr. said:

Comparison with sys.versioninfo would be trivial, and seems sufficient:

if sys.versioninfo < (2,2,2): print "Get a newer version of Python!" else: main()

FWIW - I often use something close to this near the top of my own modules (realizing that it gets skipped when the -O option is provided):

assert sys.version_info >= (2,2,2), 'requires Python 2.2.2 or better'

Matthew Barnes



More information about the Python-Dev mailing list