I don't exactly know if is it a bug, or my editor error, but at specific line, it always throw an 'IndentationError: unindent ...'
My code is:
def tokType(token):
if type(token) is str:
if ":" in token:
out = ""
for c in token:
if c == ":":
break
out += c
return out
else:
return None
elif type(token) is list:
for i, t in enumerate(token):
if i != 0 and tokType(t) != tokType(token[i-1]):
return "multi"
return tokType(token[0])
else:
raise TypeError("Unsupported type {0}, expecting List or String!".format(type(token)))
Why am I getting this error??