recursion within a class
<p>I am trying to place a recursive formula inside a class statement</p>

<pre><code>class SomeNode:

    def __init__(self, a):
        leng = len(a)
        half= leng/2
        self.firstnode=a[0][0]
        self.child1=SomeNode([a[i]for k in range(leng)])
        self.child2=SomeNode([a[j] for j in range(leng)])


    def recursfunc(self):
        print self.firstnode
        recursfunc(self.child1)
        recursfunc(self.child2)
</code></pre>

<p>However I keep getting the error message NameError: global name 'recursfunc' is not defined</p>
