Change isbasestring function as discussed on the cvs list a while ago
This commit is contained in:
parent
6179234803
commit
0b11c5fdf6
|
@ -823,11 +823,14 @@ try:
|
|||
except NameError:
|
||||
(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)
|
||||
except:
|
||||
return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType)
|
||||
|
||||
|
||||
class Values:
|
||||
|
|
Loading…
Reference in New Issue