简体   繁体   English

Visual Studio Code 不建议 Python 对象属性

[英]Visual Studio Code Does Not Suggest Python Object Attributes

I use VS Code v1.25.1 with the Python extension added.我使用 VS Code v1.25.1 并添加了 Python 扩展。 Although it suggests me the attributes and methods of libraries and classes, ie I type from sklearn.虽然它向我建议了库和类的属性和方法,即我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.它提出了诸如ensemble, exception等建议,当我生成一个 numpy 数组x_data = np.linspace(0.0, 10.0, 1000000)并在下一行说我想使用诸如argmax之类的方法或属性时输入x_data.后显示建议列表x_data. . .

In Jupyter Notebook I used to press tab after typing x_data.在 Jupyter Notebook 中,我曾经在输入x_data.后按tab x_data. to see the list.查看列表。 I wonder if there is any shortcut to achieve the same.我想知道是否有任何捷径可以实现相同的目标。

If you have IntelliSense installed, it should work automatically as you type.如果您安装了IntelliSense ,它应该会在您键入时自动运行。 Or you might try Ctrl + Space .或者您可以尝试Ctrl + Space It also depends on your configuration (see the link).它还取决于您的配置(请参阅链接)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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