> Type hints in Python are mostly for linters and code checkers, as they are not enforced at run time by CPython. PEP 585
When you think about why that is, it makes sense, but I still find it annoying that while my type hints are not enforced, if I type-hint to an object that doesn't exist, I still get a run-time error.
I kinda wish that these hints would just be interpreted as comments during runtime.
When you think about why that is, it makes sense, but I still find it annoying that while my type hints are not enforced, if I type-hint to an object that doesn't exist, I still get a run-time error.
I kinda wish that these hints would just be interpreted as comments during runtime.