Python - Custom Exceptions
Why should you avoid catching
BaseException directly in most cases?BaseException directly in most cases?BaseException is the root of all exceptions, including system-exiting ones like KeyboardInterrupt and SystemExit.BaseException prevents system-exiting exceptions from terminating the program, which can cause unwanted behavior.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions