Do any Python IDEs have support for type hinting or limited code completion for function arguments?

StackOverflow https://stackoverflow.com/questions/21609222

  •  08-10-2022
  •  | 
  •  

Question

I like using IDEs when writing stuff in Python or other languages because modern features like call tips or code completion make things much easier. Since Python is a dynamically typed language there is, of course, no way to provide these features for variables such as function arguments. This causes the modern features to disappear, which results in everything being cumbersome and time consuming, because I usually have to reference class definitions to double check the correctness of what I'm accessing.

Are there any Python IDEs that have support for code completion by suggesting an expected type for a variable? For example, if variable x is expected to be a str class, I would like to be able to suggest that x's type is str and have code completion enabled for that class.

I read that PyDev might be able to do this, but I really don't want to use it because Eclipse. My preferred IDE is PyScripter, but I'm fairly certain that it can't do this.

Was it helpful?

Solution

Try PyCharm, supports code completion, on-the-fly error highlighting, auto-fixes etc. http://www.jetbrains.com/pycharm/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top