From fe6f07c0acda9f93179e25710e16368212f56a65 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Mon, 1 Mar 2010 20:11:57 +0000 Subject: #7637: avoid repeated-concatenation antipattern in example --- Doc/includes/minidom-example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/includes/minidom-example.py b/Doc/includes/minidom-example.py index c30c4e0..4bca949 100644 --- a/Doc/includes/minidom-example.py +++ b/Doc/includes/minidom-example.py @@ -19,11 +19,11 @@ document = """\ dom = xml.dom.minidom.parseString(document) def getText(nodelist): - rc = "" + rc = [] for node in nodelist: if node.nodeType == node.TEXT_NODE: - rc = rc + node.data - return rc + rc.append(node.data) + return ''.join(rc) def handleSlideshow(slideshow): print "" -- cgit v0.12