Closed blueyed closed 5 years ago
OTOH this would also swallow KeyboardInterrupt
then.. which might be problematic if there's some infinite loop in multiple repr's - not sure if this is good.
OTOH this would also swallow
KeyboardInterrupt
then.. which might be problematic if there's some infinite loop in multiple repr's - not sure if this is good.
This is indeed problematic. Wouldn't it be okay to check if it's a KeyboardInterrupt
exception?
Ok, we could change it to raise KeyboardInterrupt still - is that what you mean?
Yeah, I think something like this should work:
# ....
except KeyboardInterrupt:
raise
Cool, amended.
Yeah I think this looks okay. @Delgan any objections?
@Qix- Yeah, this looks fine. :)
The standard library doesn't even bother with KeyboardInterupt
, but do catch BaseException
, so this is a welcome improvement.
Great :)
Ref: https://github.com/Qix-/better-exceptions/issues/85#issuecomment-489930136