What is the expected behavior of this code?
The assertion fails because the global variable m is initially 0. This raises AssertionError, which is not an ArithmeticError; the outer catch-all except handles it, increments m to 1, and the program prints 1.
m
0
AssertionError
ArithmeticError
except
1
Community Discussion