Jump to >

This documentation covers the in-development release of Djblets. You can see the latest stable docs or all previous versions.

djblets.util.humanize

Functions to humanize values.

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"