The best Python feature you cannot use
bitecode.dev
bitecode.dev
https://github.com/boothby/dissert
The big problem is that some people use assert wrong. There's a distinct time and place for asserts, and that's for testing purely internal logic. If you're testing anything that can be tainted with user data, that must be done with a conditional & exception.
Dissert saves the day! You can disable asserts on a per-file basis, and get that PYTHONOPTIMIZE experience with no perceived loss of safety. Of course, it uses the horrid content-encoding hack to trim assertions out of your code, so I make no guarantees.
In theory, they would be the perfect plugin system, but in practice, they are so slow if all your stack add a couple of them, Python start up takes seconds.
And this is why we are all using the .pth hack.