
Greg Ward writes:
Seems to me that the three most important language/library features in 1.5 were: * packages
Try "import ni" in the script for older Pythons. This worked fine for Grail until other aspects of the code required 1.5. Make sure the __init__.py files contain nothing by comments and docstrings.
* re and r''
Use regex and more backslashes. These are convenient, but not required for functionality.
* class-based exceptions
Not required for functionality.
re and class-based exceptions are only used under 1.5, but I'm not sure if I could sweep the heavily "packagized" nature of the Distutils under the rug. Would we have to resurrect use of the 'ni' module in the 1.4 case? Would that be painful?
import sys; if sys.version[:3] < "1.5": import ni
Any other language features I should be wary of avoiding? I am willing to consider supporting 1.4 if it won't be too much trouble, but not in the initial phases -- we should probably worry about that when it comes time to make a public release in a few months.
Don't use assert; write a function that does the same thing. This is trivial, but you're welcome to steal the Assert module from Grail if it's too much typing. ;-) -Fred -- Fred L. Drake, Jr. <fdrake@acm.org> Corporation for National Research Initiatives