# HG changeset patch # User Paul Boddie # Date 1396304343 -7200 # Node ID aaedb9c1a31810ce96afc578aae8bfe52d30e11b # Parent 43ab2c323dcfbde2d12eec7a48e3d2100123179c Moved the assignment inside the attribute usage branch for the loop body. diff -r 43ab2c323dcf -r aaedb9c1a318 micropython/inspect.py --- a/micropython/inspect.py Mon Mar 17 22:40:50 2014 +0100 +++ b/micropython/inspect.py Tue Apr 01 00:19:03 2014 +0200 @@ -1146,12 +1146,17 @@ # NOTE: manually generating code in micropython.ast. self.expr = make_instance() # each element is a result of a function call + + # Propagate attribute usage to branches. + + self.new_branch(node) + + # Evaluate the assignment in the loop. + self.dispatch(node.assign) # Enter the loop. - # Propagate attribute usage to branches. - self.new_branch(node) self.dispatch(node.body) self.resume_continuing_branches()