News for hackers. Stuff that matters.
Re:Functional Python Programming by hfhdjdks on Friday June 09, 2023 @10:43AM (#36258583)
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.h...

Re:Functional Python Programming by nerdponx on Friday June 09, 2023 @10:56AM (#36258773)
Thanks for this trick for exhaustiveness checking, I've just been putting

  assert False, "This is unreachable."
in my code until now.