diff options
| author | Alasdair Colley <ac@dneg.com> | 2013-09-05 10:31:57 +0100 | 
|---|---|---|
| committer | Alasdair Colley <ac@dneg.com> | 2013-09-05 10:31:57 +0100 | 
| commit | 521a71199b7c2a517e4f495d38e3b2b55bf4ad41 (patch) | |
| tree | a4be47b6da2efbf69199b66e7eab60cff55933b6 /wikiquery | |
| parent | 0a13cac0448c6c9dff34f772424a80e94dac1ab7 (diff) | |
making it less clever :(
Diffstat (limited to 'wikiquery')
| -rwxr-xr-x | wikiquery | 8 | 
1 files changed, 5 insertions, 3 deletions
@@ -10,10 +10,12 @@ version = "0.0.2"  def display(o):  	if isinstance(o, list): -		# partially apply the unicode.encode function with appropriate encoding and error handling -		encode = partial(unicode.encode, encoding="utf-8", errors="replace") -		print "'%s'" % "', '".join(map(encode, o)) +		output = [] +		for item in o: +			output.append(item.encode("utf-8", "replace")) + +		print "'%s'" % "', '".join(output)  	else:  		print o.encode("utf-8", "replace")  | 
