Since the book already cover namedtuple in Ch.18, maybe consider adding dataclass as well? It's been in the stdlib since 3.7 and is pretty common nowadays.
It'd be a nice complement to namedtuple—mutable, supports methods, less boilerplate than writing a regular class. Readers would find it useful.
Since the book already cover namedtuple in Ch.18, maybe consider adding dataclass as well? It's been in the stdlib since 3.7 and is pretty common nowadays.
It'd be a nice complement to namedtuple—mutable, supports methods, less boilerplate than writing a regular class. Readers would find it useful.