diff options
| author | Martin Fischer <martin@push-f.com> | 2022-02-23 17:23:38 +0100 | 
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2022-02-23 17:23:38 +0100 | 
| commit | 7c914668646504077caae217ca13332f6244f7d9 (patch) | |
| tree | c96b1828b6df2c90ab480ad0f06b3840ef53e8b6 | |
| parent | ccd15c20cdb44ed32b707f44e3f720b159da2f0b (diff) | |
update tricky_try_except test
| -rw-r--r-- | puzzles/tricky_try_except.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| 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 | 
