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

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -