Error calling function from dictionary
<p>I just want to create a class with a lot of functions which need to import some variables of the class for there output. To make the use more efficient i wanted to store the functions in a dictionary, but somehow that is not working at all...</p>

<hr>

<pre><code>class A(object):

    var = 'hello'
    def g(self,x):
        return self.var
    dict = {'g':g}


if __name__ == "__main__":

    a = A()
    print a.g(0)
    print a.dict['g'](0)
</code></pre>

<hr>

<h2>OUTPUT</h2>

<pre><code>hello
    print a.dict['g'](0)
TypeError: g() takes exactly 2 arguments (1 given)
</code></pre>

<hr>

<p>what is happening within the dictionary with the function g???</p>
