I have a recursive function. My base case is:
somemethod(somelist)
[INDENT]if len(somelist) == 0[/INDENT]
[INDENT][INDENT]return[/INDENT][/INDENT]
...
This is suppose to return the function to the place where it was called from.
main()
...
somemethod(somelist)
...
But I get this error:
AttributeError: Trie instance has no attribute '__len__'
This is what I print out:
Somemethod called..
length: 1
Somemethod called..
length: 1
Somemethod called..
length: 2
Somemethod called..
length: 1
Somemethod called..
length: 1
Somemethod called..
length: 0
I'm trying to return... I found error! -- this is the base case!
Somemethod called..
length:
length is the len of the list.
Can someone kindly help me out!
Thanks
drjay