Re:Practical Python Programming
by ed25519FUUU on Thursday June 18, 2020 @08:08PM
(#23569576)
It’s not enforced at all, and only serves to provide development feedback.
[ Parent
| on HN ]
Re:Practical Python Programming
by dragonwriter on Thursday June 18, 2020 @10:21PM
(#23570383)
The annotations are a language syntax feature than the runtime doesn't enforce. There are a number of separate static typecheckers, such as mypy, that do allow AOT static verification (which is, after all, all languages like Haskell have; runtime enforcement of types that have been statically verified in advance isn't super common or necessary.)