mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#7637: avoid repeated-concatenation antipattern in example
This commit is contained in:
parent
66dab172fe
commit
fe6f07c0ac
1 changed files with 3 additions and 3 deletions
|
@ -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>"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue