TypeError: init_animals() takes 1 positional arguments but 2 were given
- by libra
I know this title look familiar to some old questions, but i've looked at every single one of them, none of them solves.
And here is my codes:
class Island (object):E,W,R,P
def __init__(self, x, y):
self.init_animals(y)
def init_animals(y):
pass
isle = Island(x,y)
However, i got the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in __init__
TypeError: init_animals() takes 1 positional arguments but 2 were given
Please tell me if i got any mistakes, im so confused by this.
Best regards