4 ms·
I agree that bare excepts are bad, however they do not catch Ctrl-C. If you _do_ want to catch Ctrl-C you have to except a KeyboardInterrupt explicitly.
by doctoboggan 12y ago
I agree that bare excepts are bad, however they do not catch Ctrl-C. If you _do_ want to catch Ctrl-C you have to except a KeyboardInterrupt explicitly.
- njharman 12y agoThis is untrue (just tested) for at least Python 2.7.x. under Linux, try ... except catches Ctrl-C.