Passing an argument to a decorator inside a list accessing self vars?
<p>How can I modify a <code>self</code> variable with a <code>decorator</code>?</p>

<p>Ex.</p>

<pre><code>class Foo:
   def __init__(self,a):
       self.a = a
       self.li = []

    def afunction(self):
       pass
</code></pre>

<p>I want to add the function object <code>afunction</code> to the list <code>self.li</code> so I can call it in a list. Ex. Have a list of functions defined by the class. How would I do that?</p>

<p>Thanks</p>
