1.1 --- a/micropython/ast.py Wed Sep 30 00:24:41 2009 +0200
1.2 +++ b/micropython/ast.py Wed Sep 30 00:53:07 2009 +0200
1.3 @@ -1009,7 +1009,17 @@
1.4 self.new_op(ClearException())
1.5 self.drop_exception_blocks()
1.6
1.7 - def visitTryFinally(self, node): raise TranslationNotImplementedError(self.module.full_name(), node, "TryFinally")
1.8 + def visitTryFinally(self, node):
1.9 +
1.10 + """
1.11 + Add finally handler, potentially as an exception handler.
1.12 + Generate body, potentially changing return statements so that they do
1.13 + not return immediately.
1.14 + Generate handler, removing the handler from the active handler list,
1.15 + adding instructions which raise active exceptions.
1.16 + """
1.17 +
1.18 + raise TranslationNotImplementedError(self.module.full_name(), node, "TryFinally")
1.19
1.20 def visitWhile(self, node):
1.21 exit_block = self.new_block()