finesse.utilities.misc.calltracker

finesse.utilities.misc.calltracker(func)[source]

Decorator used for keeping track of whether the current state is inside the decorated function or not.

Sets an attribute has_been_called on the function which gets switched on when the function is being executed and switched off after the function has returned. This allows you to query func.has_been_called for determining whether the code being executed has been called from within func.