Python - test if variable is a string
In Python 2.x - string can be str or unicode, so the test is:
isinstance(s, basestring)
In Python 3.x - there are only unicode strings (str):
isinstance(s, str)
isinstance(s, basestring)
In Python 3.x - there are only unicode strings (str):
isinstance(s, str)