Python version dilemma
Skip Montanaro
skip at pobox.com
Mon Aug 27 16:42:56 EDT 2001
Aahz> Eww. That would mask a real syntax error (say, introduced by a
Aahz> typo). Use an if statement.
That's a bit more complex because the sys.version* stuff isn't the same
between versions, but is obviously an option. Still, presuming you actually
test your code enough to try importing the relevant modules before shipping
them to a client, you should be able to catch all syntax errors that are not
associated with version changes.
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list