From 0bea98520c8fbefab29b60c25c5586747f9bf6f1 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 25 Feb 2022 08:26:09 +0100 Subject: rename puzzles --- puzzles/seq_try_except_finally.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 puzzles/seq_try_except_finally.py (limited to 'puzzles/seq_try_except_finally.py') diff --git a/puzzles/seq_try_except_finally.py b/puzzles/seq_try_except_finally.py new file mode 100644 index 0000000..d63ab10 --- /dev/null +++ b/puzzles/seq_try_except_finally.py @@ -0,0 +1,8 @@ +def foo() -> None: + file = None + try: + file = open('test.json') + except Exception: + return None + finally: + file.name # error -- cgit v1.2.3