smpl.util.util

Functions

find_nearest(array, value)

Return the element in array closest to value

find_nearest_index(array, value)

Returns the index of the element in array closest to value

get(key, ddict[, default])

Returns dict[key] if this exists else default.

has(key, ddict)

Checks if the key is in the dict and not None.

times(s, n)

Concats string s n times.

true(key, ddict)

Checks if the key is in the dict and not None and True.