+ 2
What if an error occurs in the finally statement
3 ответов
0
I think this still holds true if finally throws an error:
The documentation says that it's executed "within" the try statement, but it seems like it might be better to say it's executed after the except statement. It has access to all of the variables in the try statement as a consequence of Python's lexical scoping rules, but it's not going to go back to the except clause even if it raises an error.
it basically flows back up, finally throws error with traceback to try. code in the except clause will not be executed.
0
got it thanxx
0
fix error