disco.util.functional

Constants

NO_MORE_SENTINEL = object()

Functions

take(seq, count)

Take count many elements from a sequence or generator.

Args
Name Type Description
seq sequnce or generator The sequnce to take elements from.
count int The number of elments to take.

chunks(obj, size)

Splits a list into sized chunks.

Args
Name Type Description
obj list List to split up.
size int Size of chunks to split list into.

one_or_many(f)

Wraps a function so that it will either take a single argument, or a variable number of args.

simple_cached_property(method)

results matching ""

    No results matching ""