1.1 --- a/micropython/inspect.py Thu Feb 25 01:22:21 2010 +0100
1.2 +++ b/micropython/inspect.py Fri Feb 26 01:26:01 2010 +0100
1.3 @@ -329,8 +329,8 @@
1.4 def new_branchpoint(self):
1.5 self.get_namespace()._new_branchpoint()
1.6
1.7 - def new_branch(self):
1.8 - self.get_namespace()._new_branch()
1.9 + def new_branch(self, loop_node=None):
1.10 + self.get_namespace()._new_branch(loop_node)
1.11
1.12 def abandon_branch(self):
1.13 self.get_namespace()._abandon_branch()
1.14 @@ -960,13 +960,14 @@
1.15
1.16 self.in_loop = 1
1.17 self.dispatch(node.test)
1.18 - self.new_branch()
1.19 + self.new_branch(node)
1.20 self.dispatch(node.body)
1.21 self.shelve_branch()
1.22 self.in_loop = 0
1.23
1.24 # Maintain a branch for the else clause or the current retained usage
1.25 # where execution avoids the conditional clauses.
1.26 + # NOTE: Consider merging here before the else clause.
1.27
1.28 self.new_branch()
1.29 if node.else_ is not None: