In python is there an easy way to tell if something is not a sequence? I tried to just do: if x is not sequence but python did not like that
if x is not sequence
The Python 2.6.5 documentation describes the following sequence types: string, Unicode string, list, tuple, buffer, and xrange.
def isSequence(obj): return type(obj) in [str, unicode, list, tuple, buffer, xrange]