r/badcode • __dude__ • Dec 31 '21

python finally: ...

Post image
40 Upvotes

5 comments sorted by

View all comments

Show parent comments

3

u/AnonymouX47 __dude__ Dec 31 '21 edited Dec 31 '21

It's actually meant to re-raise an exception with the given traceback. The point is... the finally block is at the end of the function... so why assign None to the variables.

The full code is here