backward/forward compatibility in PYTHON?
Lulu of the Lotus-Eaters
mertz at gnosis.cx
Fri May 31 13:01:37 EDT 2002
holger krekel <pyth at devel.trillke.net> wrote previously:
|- if you know you are using e.g. python2.2 features you might
| want to code a one-line assertion like
|
| asssert(sys.version_info[:2]>=(2,2))
>>> import sys
>>> assert(sys.version_info[:2]>=(2,2))
Traceback (innermost last):
File "<stdin>", line 1, in ?
AttributeError: version_info
Of course, it *does* work in Python 2.2 :-).
--
mertz@ _/_/_/_/_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY:_/_/_/_/ v i
gnosis _/_/ Postmodern Enterprises _/_/ s r
.cx _/_/ MAKERS OF CHAOS.... _/_/ i u
_/_/_/_/_/ LOOK FOR IT IN A NEIGHBORHOOD NEAR YOU_/_/_/_/_/ g s
More information about the Python-list
mailing list