Python 2.0 incompatibility
David Goodger <[email protected]> Sat, 13 Sep 2003 19:51:03 -0400
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
Optik's home page says:
Requirements
Optik requires Python 2.0 or greater.
But Python's optparse.py doesn't include this part of Optik's
lib/option.py:
# Do the right thing with boolean values for all known Python versions.
try:
True, False
except NameError:
(True, False) = (1, 0)
Is pre-2.3 compatibility important for optparse.py? Should
optparse.py be added to PEP 291 (Backward Compatibility for Standard
Library, http://www.python.org/peps/pep-0291.html) with 2.0 as the
Python version for backward compatibility? I ask because Docutils
includes optparse.py (built with the "merge" script) for optional
installation with pre-2.3 Python, but without the compatibility code
(above) optparse.py is not compatible with Python pre-2.2.1.
If compatibility is important, I suggest either replacing "False" with
"0" and "True" with "1", or changing the "merge" script to include the
compatibility code.
If pre-2.3 compatibility isn't important for optparse.py (as opposed
to the standalone optik package), I'll have to distribute a
slightly-modified version of optparse.py with Docutils.
--
David Goodger http://starship.python.net/~goodger
For hire: http://starship.python.net/~goodger/cv
Docutils: http://docutils.sourceforge.net/
(includes reStructuredText: http://docutils.sf.net/rst.html)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf