djblets.util.humanize
-
humanize_list
(value)[source]
Humanizes a list of values, inserting commas and “and” where appropriate.
Example List |
Resulting string |
["a"] |
"a" |
["a", "b"] |
"a and b" |
["a", "b", "c"] |
"a, b and c" |
["a", "b", "c", "d"] |
"a, b, c, and d" |