The article doesn't mention type annotations described in PEP484 and added to CPython since Python 3.5.
It is possible to add annotations to your code like
class Foo:
x: int
# ...
and then run type checks using `mypy`, so that for the annotated code probability of the "passes the checks => won't crash the runtime" case is much larger.