Skip to content

Instantly share code, notes, and snippets.

@pyrtsa
Created October 13, 2011 20:11
Show Gist options
  • Save pyrtsa/1285366 to your computer and use it in GitHub Desktop.
Save pyrtsa/1285366 to your computer and use it in GitHub Desktop.
isstring(x)
def isstring(x):
"""Check whether x is a string (i.e. inherits basestring)"""
return isinstance(x, basestring)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment