python 3.x - 'IndentationError: unindent does not match any outer indentation level', when indent is completly correct -
i don't know if bug, or editor error, @ specific line, throw 'indentationerror: unindent ...'
code is:
def toktype(token): if type(token) str: if ":" in token: out = "" c in token: if c == ":": break out += c return out else: return none elif type(token) list: i, t in enumerate(token): if != 0 , 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 getting error??
it editor fault. started write tabs instead of spaces. found-replaced tabs spaces , checked settings.
Comments
Post a Comment