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

No he means CPython. While the meaning of the annotations are ignored at runtime, the typing library still has to be imported and typing annotations evaluated (as it evaluate that the type annotation has a value of List[int], not to check that the value tagged with the type annotation actually has that value).

As a result, in CPython 3.6 a module that has been type hinted will import slower than one that doesn't.



> Python supersets that do use type annotations for optimization

Such as Cython.




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

Search: