1.1 --- a/simplify.py Mon Jul 31 21:20:33 2006 +0200
1.2 +++ b/simplify.py Tue Aug 01 00:56:22 2006 +0200
1.3 @@ -831,7 +831,7 @@
1.4
1.5 # Finish the subprogram definition.
1.6
1.7 - subprogram.code = test
1.8 + subprogram.code = [test]
1.9
1.10 self.current_subprograms.pop()
1.11 self.subprograms.append(subprogram)
1.12 @@ -875,13 +875,14 @@
1.13 # Wrap the assignment in a try...except statement.
1.14
1.15 try_except = Try(body=[], else_=[], finally_=[])
1.16 - try_except.handler = Conditional(
1.17 + test = Conditional(
1.18 test=Invoke(
1.19 expr=LoadName(name="isinstance"),
1.20 args=[LoadExc(), LoadName(name="StopIteration")], star=None, dstar=None
1.21 ),
1.22 body=else_stmt,
1.23 else_=[Raise(expr=LoadExc())])
1.24 + try_except.handler = [test]
1.25
1.26 assign = Assign()
1.27 assign.code = [