简体   繁体   中英

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

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.

尝试使用PyCharm,支持代码完成,动态错误突出显示,自动修复等。http://www.jetbrains.com/pycharm/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM