Python throwing an indented block error. not seeing it -
my python code throwing expected indented block
error right after elif
.
i having trouble seeing indenting mistake is.
what indentation mistake have made?
def expandprocedure(node, queue): successors = [] n = 4 while (n > 0): parent = node depth = node[2] + 1 pathcost = node[3] + 1 newstate = teststate(node[0], n) if newstate == 0: ## nothing elif inqueue(newstate[0], queue): #do nothing else: s = makenode(newstate, parent, depth, pathcost) successors.insert(0, s) n = n - 1 return successors
you can't have null block. use pass (non-)command:
if newstate == 0: pass elif inqueue(newstate[0], queue): pass
Comments
Post a Comment