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

The newest PyCharm uses an interesting dynamic approach. You can run your app in their debugger and enable collecting of type parameter info (at a significant performance loss, however).

So when you have a function like: def foobarize(f): return f.something *2; then it will know what types f might have when foobarize is called. Now when you go back into the editor, it can give you a hint about it.

Other than that, it uses some type hints from docstrings (you can tell it type foo is YourClass and it will complete based on that) and light type guessing.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: