Re: Python 2.0 incompatibility
Greg Ward <[email protected]> Sun, 14 Sep 2003 12:19:26 -0400
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
On 13 September 2003, David Goodger said:
> 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?
No. The 'merge' script is correct *if it is only used for generating
the std library optparse.py*. That's obviously not the case, so the
merge script is in fact wrong here. (IMHO.)
> 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.
I vote for the latter, and it should be optional. Eg. add an option to
'merge' to make it generate pre-2.3-compatible code. (Err, really,
pre-2.2.1 compatibility -- AFAIK the only post-2.0 feature that Optik
uses is True/False. I could be wrong, of course...)
Greg
--
Greg Ward <[email protected]> http://www.gerg.ca/
A hairstyle's not a lifestyle / Imagine Sid Vicious at 35
-- Dead Kennedys
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf