Passing parameters to decorator at runtime
<p>If I create a python decorator function like this</p>

<pre><code>def retry_until_true(tries, delay=60):
    """
    Decorator to rety a function or method until it returns True.
    """
    def deco_retry(f):
        def f_retry(*args, **kwargs):
            mtries  = tries
            rv = f(*args, **kwargs)
            while mtries &gt; 0:
                if rv is True:
                    return True
                mtries -= 1
                time.sleep(delay)
                rv = f(*args, **kwargs)
            return False
        return f_retry
    return deco_retry
</code></pre>

<p>I can use it like this </p>

<pre><code>    @retry_until_true(20, delay=30)
    def check_something_function(x, y):
        ...
        return True
</code></pre>

<p>But is there a way to pass different values for 'tries' and 'delay' to the decorator at runtime, so that 20 and 30 are variables?</p>
