carrot.utils

carrot.utils.gen_unique_id()

Generate a unique id, having - hopefully - a very small chance of collission.

For now this is provided by uuid.uuid4().

carrot.utils.partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

carrot.utils.rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

Previous topic

carrot.serialization

Next topic

Change history

This Page