PyDev 新手,关于自动完成的问题
我安装了 Eclipse 和 PyDev,我想知道是否还需要设置其他东西?
我问的原因是我发现自动完成功能在某些情况下不起作用。例如,如果我有一个变量 a_string,我希望在输入“a_string”后看到可用方法的列表。或者如果我有一个数组,我想看看它有什么方法。但没人使用自动提款机。
现在我可以看到导入包中的方法。
I installed Eclipse and PyDev and I'm wondering if I have to setup anything else?
The reason I'm asking is that I'm finding the auto complete isn't working in certain cases. For example, if I have a variable a_string, I'd like to see a list of available methods once I type "a_string." or if I have an array I'd like to see what methods it has. But neither one works atm.
Right now I can see methods from imported packages though.
它应该开箱即用(假设你正确配置了 python 解释器路径)。
但是,请记住,由于 Python 是鸭子类型的,因此您不一定获得您期望从强类型语言(例如 Java)获得的完整自动完成集。话虽如此,PyDev 在检测自动完成的简单场景方面确实做得很好,例如:
此外,请查看 这个问题了解更多信息。
It should work out of the box (given you configured your python interpreter path properly).
However, keep in mind that since Python is duck-typed you will not necessarily get the full auto-complete set you would expect from strongly-typed languages such as Java. Having said that, PyDev does do a good job with detecting easy scenarios to auto-complete, such as:
Additionally, check out this question for some more info.