Visual Studio代码不建议使用Python对象属性 [英] Visual Studio Code Does Not Suggest Python Object Attributes
问题描述
我使用添加了Python扩展名的VS Code v1.25.1.尽管它向我建议了库和类的属性和方法,即我键入from sklearn.
,但它提出了诸如ensemble, exception
等建议,当我生成一个numpy数组x_data = np.linspace(0.0, 10.0, 1000000)
时,在下一行说我想使用方法或属性(例如argmax
)在输入x_data.
后不会显示建议列表.
I use VS Code v1.25.1 with the Python extension added. Although it suggests me the attributes and methods of libraries and classes, i.e. I type from sklearn.
it makes suggestions like ensemble, exception
etc., when I generate a numpy array x_data = np.linspace(0.0, 10.0, 1000000)
and on the next line say I would like to use a method or an attribute such as argmax
it does not show me the suggestion list after typing x_data.
.
在Jupyter Notebook中,我通常在键入x_data.
来查看列表后按tab
.我想知道是否有任何捷径可以达到相同的目的.
In Jupyter Notebook I used to press tab
after typing x_data.
to see the list. I wonder if there is any shortcut to achieve the same.
PS:很抱歉,如果我在表达问题时遇到任何概念性错误,因为我对OOP还是陌生的.
PS: Sorry if I made any conceptual mistakes while trying to express the problem for I am quite new to the OOP.
推荐答案
如果您 IntelliSense 已安装,它将在您键入时自动运行.或者您可以尝试Ctrl + Space
.这也取决于您的配置(请参阅链接).
If you have IntelliSense installed, it should work automatically as you type. Or you might try Ctrl + Space
. It also depends on your configuration (see the link).
这篇关于Visual Studio代码不建议使用Python对象属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!