[Zodb-checkins] CVS: StandaloneZConfig/ZConfig - datatypes.py:1.26

Fred L. Drake, Jr. fred at zope.com
Fri Mar 19 11:08:34 EST 2004


Update of /cvs-repository/StandaloneZConfig/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv26015

Modified Files:
	datatypes.py 
Log Message:
fix support for Python compiled without Unicode support


=== StandaloneZConfig/ZConfig/datatypes.py 1.25 => 1.26 ===
--- StandaloneZConfig/ZConfig/datatypes.py:1.25	Tue Mar 16 16:28:40 2004
+++ StandaloneZConfig/ZConfig/datatypes.py	Fri Mar 19 11:08:00 2004
@@ -17,16 +17,17 @@
 import re
 import sys
 
-# types.StringTypes was added in Python 2.2
+# types.StringTypes was added in Python 2.2; basestring in 2.3
 try:
     unicode
 except NameError:
-    StringTypes = type(''), type(unicode(''))
-    UnicodeType = StringTypes[1]
-else:
-    StringTypes = type(''),
     UnicodeType = None
+    StringTypes = type(''),
+else:
+    UnicodeType = type(unicode(''))
+    StringTypes = type(''), UnicodeType
 
+# True, False were added in Python 2.2.1
 try:
     True
 except NameError:




More information about the Zodb-checkins mailing list