0
Intellisence无法帮助对象的Python成员,因为只有在运行时才能知道对象类型。有没有办法指定变量的类型?在Python中定义强类型变量
E.g.
import xml.etree.ElementTree
root = xml.etree.ElementTree.parse(x).getroot()
for data in root.findall('./data'):
data.
有写类似的方式:
for data:xml.etree.Element in root.findall('./data'):
我会建议使用Python的一个更好的文本编辑器。另外,python是强类型的,但不是静态类型。 –
Pycharm IDE来拯救! – felipsmartins
我正在使用PyCharm/IntelliJ – Bishoy