August 13, 2020
Typed APIs in Python with dataclasses and NamedTuples
Why would Python programmers ever care about types? While Python doesn’t check any types statically (before running the program), it does perform extensive run-time type checking. Checking types at run-time without any implicit casts makes the language strongly-typed and dynamically-typed, as opposed to a language like C which is weakly-typed and statically-typed. This is an important distinction, but I won’t go over the differences between strong and weak typing in this post.
Read more