1.1 --- a/annotate.py Tue Dec 12 01:21:36 2006 +0100
1.2 +++ b/annotate.py Wed Dec 13 00:24:59 2006 +0100
1.3 @@ -369,6 +369,12 @@
1.4 self.namespace.merge_namespace(body_namespace)
1.5 self.namespace.merge_namespace(else_namespace)
1.6
1.7 + # NOTE: Test of exception type pruning based on the test/body.
1.8 +
1.9 + if conditional.isolate_test:
1.10 + for exc_type in body_namespace.raises:
1.11 + self.namespace.revoke_exception_type(exc_type)
1.12 +
1.13 return conditional
1.14
1.15 def visitGlobal(self, global_):
2.1 --- a/simplify.py Tue Dec 12 01:21:36 2006 +0100
2.2 +++ b/simplify.py Wed Dec 13 00:24:59 2006 +0100
2.3 @@ -1267,9 +1267,7 @@
2.4 )
2.5 )
2.6
2.7 - # Always return from conditional sections.
2.8 -
2.9 - test.body += self.dispatch(stmt) + [ReturnFromBlock()]
2.10 + test.body += self.dispatch(stmt)
2.11 nodes.append(test)
2.12 nodes = test.else_ = []
2.13