推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Williamongh
V2EX  ›  Python

请问如何在 VSCode 下,实现 Python 定义变量的功能自动补全?

  •  
  •   Williamongh · Aug 20, 2018 · 5605 views
    This topic created in 2851 days ago, the information mentioned may be changed or developed.

    在 Pycharm 下,可以通过

    a = np.array([1,2,3]) 
    b = a + 1    # type: np.array
    
    

    来实现对变量 b 的属性的提示,请问在 VSCode 中通过何种方式(如设置、插件)可以达到上述效果? 谢谢各位 V 友!

    4 replies    2018-08-20 14:04:48 +08:00
    huangzhe8263
        1
    huangzhe8263  
       Aug 20, 2018 via Android
    没用 vscode 写过 python
    不过如果是 python 在 3.5 以上的话,可以用 type hinting 实现
    hanbaobao2005
        2
    hanbaobao2005  
       Aug 20, 2018
    Extension: Python
    simple2025
        3
    simple2025  
       Aug 20, 2018
    老老实实 pycharm 吧,vscode python 开发者的实力和 vscode js 开发者的实力不是一个档次的呀
    icylogic
        4
    icylogic  
       Aug 20, 2018 via iPhone
    https://i.loli.net/2018/08/20/5b7a59b372ca2.png

    这样吗?鼠标 Hover 上去就好了啊,插件 Visual Studio IntelliCode. MS DevLabs 出品,号称 AI-Assisted
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3142 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 66ms · UTC 13:42 · PVG 21:42 · LAX 06:42 · JFK 09:42
    ♥ Do have faith in what you're doing.