From: David G. <go...@us...> - 2003-09-14 19:00:39
|
Update of /cvsroot/docutils/docutils/extras In directory sc8-pr-cvs1:/tmp/cvs-serv28763 Modified Files: optparse.py Log Message: another update; Python 2.0 compatibility Index: optparse.py =================================================================== RCS file: /cvsroot/docutils/docutils/extras/optparse.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- optparse.py 11 Sep 2003 23:02:54 -0000 1.2 +++ optparse.py 14 Sep 2003 19:00:34 -0000 1.3 @@ -283,6 +283,12 @@ return "%s\n%s\n" % (heading, "=-"[self.level] * len(heading)) +# Do the right thing with boolean values for all known Python versions. +try: + True, False +except NameError: + (True, False) = (1, 0) + _builtin_cvt = { "int" : (int, "integer"), "long" : (long, "long integer"), "float" : (float, "floating-point"), |