Python Recursion Handling -


i have recursively traverse objects inside list.

def function():    object in list:       if object.field none:          // stuff here       else:            function(object.field)    return 

the problem i'm facing python doesn't object inside list, instead return every time meet " object.field != none " . want return when loop over, until object inside list done.

can explain me way this?

you're calling function again when object.field none. first block of if run when object.field != none. else run when object.field == none.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -