diff options
| -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 | 
