Hacker News new | past | comments | ask | show | jobs | submit login

The docs at python.org refer to them as “type hints” ️

https://docs.python.org/3/library/typing.html




As mentioned in the other comment, this is just a library used to give type hints as annotations. The feature itself is called annotations, this is one specific use-case.

The reason this library exists in stdlib is so that all the different type hint libraries can interoperate. Otherwise if they each brought their own typing, you couldn't switch between different static analysis libraries.


`typing` is the module that uses annotations as type hints. Parent is correct; Python documentation calls the syntax annotations.


So Python docs refer to both depending on the context.




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

Search: