Show sensible tooltips for misc column

This commit is contained in:
DarkPhoenix
2012-03-19 16:43:35 +04:00
parent 2971a97dc7
commit c75ef1cc29
2 changed files with 165 additions and 37 deletions

View File

@@ -0,0 +1,9 @@
def formatList(words):
"""Transforms ("a", "b", "c") into "a, b and c" string"""
if not words:
return ""
if len(words) == 1:
return words[0]
last = words[-1:][0]
beginning = u", ".join(words[:-1])
return u"{0} and {1}".format(beginning, last)