hello I have this programm
class zoeken() :
pass
def __len__(self):
return 0
def __str__(self):
return test2
def find(self, strng="", ch="", start=0, stop=0):
index = start
while index < len(strng) and index < stop:
if strng[index] == ch:
return index
index += 1
return -1
test = zoeken()
test.woord = "tamara"
test2 = zoeken.find( test, "a", 1,5)
print test(test2)
But now Im getting this error message :
Traceback (most recent call last):
File "C:\Users\wobben\workspace\oefeningen\src\test.py", line 21, in <module>
print test(test2)
AttributeError: zoeken instance has no __call__ method
How to solve this.
Roelof