3 ms·
It's not what you were asking for (class that can't be subclassed), but `typing` has an `assert_never` to check exhaustiveness: https://typing.readthedocs.io/e
by hfhdjdks 3y ago
It's not what you were asking for (class that can't be subclassed), but `typing` has an `assert_never` to check exhaustiveness:
https://typing.readthedocs.io/en/latest/source/unreachable.html https://typing.readthedocs.io/en/latest/source/unreachable.h...
- nerdponx 3y agoThanks for this trick for exhaustiveness checking, I've just been putting assert False, "This is unreachable." in my code until now.