I ran into a PR this week where the author was inheriting what BaseException rather than exception. I made this example to illustrate the unintended side effects that it can have.
Try running these examples in a .py file for yourself and try to kill them with control-c.
Since things such as KeyboardInterrupt are created as an exception that inherits from BaseException, if you except BaseException you can no longer KeyboardInterrupt.
from time import sleep while True: try: sleep(30) except BaseException: # ❌ pass
except from Exception or higher #
If you except from exception or something than inherits from it you will be better off, and avoid unintended side effects.
...

