list.append is MUCH faster even when dealing lists with few items Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx> --- xdr/xdrgen.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xdr/xdrgen.py b/xdr/xdrgen.py index 963e01b..1f2a768 100755 --- a/xdr/xdrgen.py +++ b/xdr/xdrgen.py @@ -793,7 +793,7 @@ class Info(object): return "repr(self.%s)" % t.id indent2 = prefix + indent reprbody = ''.join(["%sif self.%s is not None:\n" \ - "%s%sout += ['%s=%%s' %% %s]\n" % + "%s%sout.append('%s=%%s' %% %s)\n" % (indent2, var.id, indent2, indent, var.id, special(var)) for var in varlist]) return "%sdef __repr__(self):\n%sout = []\n" \ -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html