code auto complete not work

import  xml.etree.ElementTree as etree

xml = etree.parse('dd.xml')

root= xml.getroot()

root.   can't show anything
when in debug  or python shell  I can see   root.tag
1 comment

Hello zhang,

The Python shell uses run-time information to display the list of members

for every object. When you edit the code in PyCharm, it doesn't run the code,

and has to rely on static code analysis in order to provide completion variants.

In this case, PyCharm doesn't know the return type of getroot(), and can't

provide any completion variants.

import  xml.etree.ElementTree as etree

xml = etree.parse('dd.xml')

root= xml.getroot()

root.   can't show anything

when in debug  or python shell  I can see   root.tag

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Please sign in to leave a comment.