I am trying to place a recursive formula inside a class statement
class SomeNode:def __init__(self, a):leng = len(a)half= leng/2self.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.firstnoderecursfunc(self.child1)recursfunc(self.child2)
However I keep getting the error message NameError: global name 'recursfunc' is not defined