def get_oblivious_callable(func):
    """Return callable which executes func ignoring args.

    Parameters
    ==========
    func (callable object)
        callable to be wrapped in the function which
        ignores arguments when called.

    Original use-case
    =================

    We had a function that didn't need any arguments, but
    had to use it in a scenario where it was required to
    conform to an arbitrary protocol (it had to receive a
    single argument).

    We didn't want to add a parameter to it just for that
    specific scenario and risk turning it unnecessarily
    confusing for people analysing from the point of view
    of the other scenarios where no argument is needed at
    all.

    So, instead of changing the functions, it is much more
    convenient to wrap the function with this wrapper,
    just before providing it wherever it needs to be used.
    """

    @wraps(func)
    def execute(*args, **kwargs):
        """Execute func ignoring arguments; return value."""
        return func()

    return execute
Return callable which executes func ignoring args.

    Parameters
    ==========
    func (callable object)
        callable to be wrapped in the function which
        ignores arguments when called.

    Original use-case
    =================

    We had a function that didn't need any arguments, but
    had to use it in a scenario where it was required to
    conform to an arbitrary protocol (it had to receive a
    single argument).

    We didn't want to add a parameter to it just for that
    specific scenario and risk turning it unnecessarily
    confusing for people analysing from the point of view
    of the other scenarios where no argument is needed at
    all.

    So, instead of changing the functions, it is much more
    convenient to wrap the function with this wrapper,
    just before providing it wherever it needs to be used.
    
nodezator/ourstdlibs/behaviour.py