datacode.models.logic package

Submodules

datacode.models.logic.combine module

datacode.models.logic.partial module

datacode.models.logic.partial.partial(func, *args, **keywords)[source]

A version of functools.partial that allows specifying positional arguments out of order using ellipses.

See: https://stackoverflow.com/a/11173903

Examples:
>>> print partial(pow, ..., 2, 3)(5) # (5^2)%3
1
>>> print partial(pow, 2, ..., 3)(5) # (2^5)%3
2
>>> print partial(pow, 2, 3, ...)(5) # (2^3)%5
3
>>> print partial(pow, 2, 3)(5) # (2^3)%5
3