3 ms·
> the time raises "KeyError" should actually be typed "Raises[T, KeyError]" You can't do this in Python your bucket will always have hole you can't plug. Arbit
by Spivak 3y ago
> the time raises "KeyError" should actually be typed "Raises[T, KeyError]"
You can't do this in Python your bucket will always have hole you can't plug. Arbitrary exceptions can appear anywhere in your code thanks to signal handlers.
KeyboardInterrupt is the one you probably know without knowing.
Exceptions can even come from higher in the stack down to you with the .throw method on generators.
- gnulinux 3y agoYep, I'm aware of these, I wrote about my thoughts about them here: https://news.ycombinator.com/item?id=37934604 https://news.ycombinator.com/item?id=37934604