Kaydet (Commit) fe6f07c0 authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

#7637: avoid repeated-concatenation antipattern in example

üst 66dab172
...@@ -19,11 +19,11 @@ document = """\ ...@@ -19,11 +19,11 @@ document = """\
dom = xml.dom.minidom.parseString(document) dom = xml.dom.minidom.parseString(document)
def getText(nodelist): def getText(nodelist):
rc = "" rc = []
for node in nodelist: for node in nodelist:
if node.nodeType == node.TEXT_NODE: if node.nodeType == node.TEXT_NODE:
rc = rc + node.data rc.append(node.data)
return rc return ''.join(rc)
def handleSlideshow(slideshow): def handleSlideshow(slideshow):
print "<html>" print "<html>"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment