Intellisense 无法识别 python 3 的类型提示

Intellisense not recognising type hinting for python 3

我想使用 Visual Studio 并查看使用类型提示的智能感知,例如在函数参数列表中,以检验变量的类型。

这可以通过 isinstance(param,type) 语句来实现,但我想知道我们是否可以在没有这些附加语句的情况下让它工作:

注意:我已经尝试 Visual Studio 使用 Python 工具 Visual Studio 以及 2017 年初的 Visual Studio 预览版,它内置了 python 支持, 但似乎都不喜欢类型提示。

经确认,此结果是设计的,请检查:Python 3.6: using type hints to describe a variable in the function argument list and the Quick Info of this variable display ‘unknown type’

Int19h: 目前结果符合预期,因为 PTVS 尚不支持驱动代码完成的类型提示。以下问题正在跟踪该功能:#82.