Modules that provide differing functionality amongst different Python versions...
Allan Crooks
googlegroups at sixtyten.org
Mon Apr 22 10:33:15 EDT 2002
> But if you are truly set on using incompatible constructs
> *everywhere* for the fun of it, you are going to have a problem
> with code duplication :-)
I wouldn't actually mind having code which would do the following:
--------
try:
import warning
except ImportError:
warning = None
....
if warning is not None:
<do something with warning module>
--------
The main problem is when I want to use 'yield', there's no real way of
compensating for a language change... I suppose it is my fault for
trying too much. :) The more I think about it, the more maintaining
concurrent versions seems appealing... at least there is no 'hacking'
involved...
Allan.
More information about the Python-list
mailing list