Show sensible tooltips for misc column
This commit is contained in:
9
gui/utils/listFormatter.py
Normal file
9
gui/utils/listFormatter.py
Normal 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)
|
||||
Reference in New Issue
Block a user