aeidon.deco

Source: aeidon/deco.py

Miscellaneous decorators for functions and methods.

Functions

aeidon.deco.decorator_apply(dec, fun)

Rewrap dec to preserve function signature.

aeidon.deco.export(function)

Decorator for delegate functions that are exported to master.

aeidon.deco.memoize(limit=100)

Decorator for functions that cache their return values.

Use None for limit for a boundless cache.

aeidon.deco.monkey_patch(obj, name)

Decorator for functions that change obj‘s name attribute.

Any changes done will be reverted after the function is run, i.e. name attribute is either restored to its original value or deleted, if it didn’t originally exist.

aeidon.deco.notify_frozen(function)

Decorator for methods to be run in notify frozen state.

aeidon.deco.once(function)

Decorator for functions that cache their only return value.

aeidon.deco.reversion_test(function)

Decorator for unit testing reversions of one action.

aeidon.deco.revertable(function)

Decorator for revertable methods of aeidon.Project.

aeidon.deco.silent(*exceptions)

Decorator for ignoring exceptions raised by function.

If no exceptions specified, ignore Exception. Return None if an exception encountered.