Mutable partial

This is analogous to functools.partial.

Examples

Make sure you have run the setup code.

def foo(*args, **kwargs):
    print('args', args)
    print('kwargs', kwargs)
    return 0

model = MyModel()
model.mutable = partial(foo, 'hello world', goodbye='moon')
model.mutable()

Out:

args ('hello world',)
kwargs {'goodbye': 'moon'}
0

sqlalchemy_mutable.partial

class sqlalchemy_mutable.partial(func, *args, **kwargs) [source]

Methods

__call__(self, *args, **kwargs) [source]

register(cls, func) [source]