Commit 0b11c5fd authored by Christian Heimes's avatar Christian Heimes

Change isbasestring function as discussed on the cvs list a while ago

parent 61792348
...@@ -823,11 +823,14 @@ try: ...@@ -823,11 +823,14 @@ try:
except NameError: except NameError:
(True, False) = (1, 0) (True, False) = (1, 0)
def isbasestring(x): try:
try: basestring
except NameError:
def isbasestring(x):
return isinstance(x, (types.StringType, types.UnicodeType))
else:
def isbasestring(x):
return isinstance(x, basestring) return isinstance(x, basestring)
except:
return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType)
class Values: class Values:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment