diff options
author | Alasdair Colley <ac@dneg.com> | 2013-09-20 15:04:44 +0100 |
---|---|---|
committer | Alasdair Colley <ac@dneg.com> | 2013-09-20 15:04:44 +0100 |
commit | 21b1c126cb93dd3dad2f24fdab97b06c78eab7b0 (patch) | |
tree | 75855072fb4d920535d4da8914c7baa0a847e7f7 | |
parent | 1a924bda724310f83ae32e46b5d3764809eb0f9d (diff) |
pythonifying some stuff
-rwxr-xr-x | wikiquery | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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: |