Hacker News new | ask | show | jobs
by progval 1640 days ago
FWIW, you can also add type annotations for namedtuples, with a syntax similar to data classes: https://docs.python.org/3/library/typing.html#typing.NamedTu...

You can even type dictionaries this way: https://docs.python.org/3/library/typing.html#typing.TypedDi...

1 comments

This is my confusion learning python, just pick a thing for struct will ya :)