Ton*_*ark 12 python indentation
def getText(nodelist):
"""Extracts the text between XML tags
I took this directly from http://docs.python.org/library/xml.dom.minidom.html.
For example, if I have a tag <Tag>525</Tag> this method returns me '525'
"""
rc = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc = rc + node.data
return rc
Run Code Online (Sandbox Code Playgroud)
给我 IndentationError: unindent does not match any outer indentation level
def getText(nodelist):
rc = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc = rc + node.data
return rc
Run Code Online (Sandbox Code Playgroud)
才不是.我所做的只是删除文档字符串注释.到底是怎么回事?