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

Simple type annotations can be entirely in comments, but for more complex usage you might want to execute code, like type aliases:

  MyContainer = List[int]
On top of that, the typing module was also backported to Python 3 versions before 3.5, where you do have annotation syntax.


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

Search: