Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: