Fixed bug #1915: Python compiles with --enable-unicode=no again. However several extension methods and modules do not work without unicode support.

This commit is contained in:
Christian Heimes 2008-01-23 14:20:41 +00:00
parent 2c63442586
commit d2f4cb8cca
4 changed files with 11 additions and 4 deletions

View file

@ -824,7 +824,11 @@ except NameError:
(True, False) = (1, 0)
def isbasestring(x):
return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType)
try:
return isinstance(x, basestring)
except:
return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType)
class Values: