python type hints and immutability

tl;dr Python type hints are super useful! I like keeping function arguments immutable, so I suggest typing lists as sequences and using either frozen dataclasses or collections.abc.Mapping instead of dictionaries. I haven’t really seen a blog post mentioning both Sequence and Mapping. (Just focusing on one or the other.) So I really wanted to create a blog post that taught people about both. I’ve been getting into functional programming, so that’s shaped how I’ve been using python type hints....

October 22, 2024