ustring = u"unicode string"
print ustring, type(ustring) #unicode string <type 'unicode'>
normalstring = "normal string"
print normalstring, type(normalstring) #normal string <type 'str'>
print type(ustring).__bases__ #(<type 'basestring'>,)
print type(normalstring).__bases__ #(<type 'basestring'>,)
判断一个变量是否为字符串,普通字符串,Unicode字符串
isinstance(a, basestring)
isinstance(a, str)
isinstance(a, unicode)