From 7c914668646504077caae217ca13332f6244f7d9 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 23 Feb 2022 17:23:38 +0100 Subject: update tricky_try_except test --- puzzles/tricky_try_except.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'puzzles/tricky_try_except.py') diff --git a/puzzles/tricky_try_except.py b/puzzles/tricky_try_except.py index de829c3..d63ab10 100644 --- a/puzzles/tricky_try_except.py +++ b/puzzles/tricky_try_except.py @@ -1,8 +1,8 @@ -def foo(): +def foo() -> None: file = None try: file = open('test.json') except Exception: - pass - - file.name # error + return None + finally: + file.name # error -- cgit v1.2.3