can you please tell me what I'm doing wrong?
here is a simple code for a Python subclass to create a person, just adding the name, and I want another class that will tell me the movies that he has rented, i'm just at the begining now
class Person(object):
def __init__(self,name):
self.name = name
class Customer(Person):
def __init__(self):
self.movie = []
super(Customer,self).__init__()
but I get this error when I try to use my code
Johnny = Customer("John")
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
Johnny = Customer("John"
TypeError: __init__() takes exactly 1 argument (2 given)
I'm new at Python and I don't really know what is going on!
Person.__init__twice?self.name = nameclass Customer(Person):.