code: def _is_string(thing):
      
      if (_py3k and isinstance(thing, str)):
          return True
      if (not _py3k and isinstance(thing, basestring)):
          return True
      return False
docs: Check that **thing** is a string. The definition of the latter depends
      upon the Python version.
  
      :param thing: The thing to check if it's a string.
      :rtype: bool
      :returns: ``True`` if **thing** is string (or unicode in Python2).