I have a python 2.6 class called Film:
class Film(Video):
def __init__(self, title, yt_link, year):
Video.__init__(self, title, yt_link)
self.year = year
and also, I have a variable result
which stores the string:
result = 'Toy Story','https://www.youtube.com/watch?v=fPhse4WlgEA','1995'
When I try to create an instance of the class:
toy_story = Film(result)
I get an error:
__init__() takes exactly 4 arguments (2 given)
However, when I input the string directly to Film(), there is no error.
How can I make it so that Film(result)
might resolve the arguments error?