【发布时间】:2017-07-25 07:00:39
【问题描述】:
当我忘记为函数或变量声明类型时,我希望 PyCharm 向我发出警告。有什么方法可以让 PyCharm 做到这一点?
【问题讨论】:
-
声明python变量的类型?!你是这个意思吗? docs.python.org/3/library/typing.html
-
不,我的意思是actual variable types when I declare them,比如
numbers: List[int] = [1,2,3]。我听说这是 Python 3.6 上的新功能。
标签: python types pycharm type-hinting typechecking