summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwikiquery7
1 files changed, 2 insertions, 5 deletions
diff --git a/wikiquery b/wikiquery
index d5806ea..e9661cc 100755
--- a/wikiquery
+++ b/wikiquery
@@ -12,11 +12,8 @@ version = "0.1.5"
def stringify(o):
if isinstance(o, list):
output = []
- i = 0
- for item in o:
- item = `i` + ": " + item
- output.append(item.encode("utf-8", "replace"))
- i = i + 1
+ for i, item in enumerate(o, 1):
+ output.append("%s: %s" % (i, item.encode("utf-8", "replace")))
return ' %s' % ', '.join(output)
else: