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