0
if a class inherits from list, does that make any influences as to whether it have code "list.__init__([])?
for example : class Mylist(list): ##inheriting from list def __init__(self,a_name): self.name=a_name list.__init__([ ]) ##this line is what make s me confused because if I use the same example without "list .__init__([ ]) and I give the class to a variable ,say "b=Mylist("whatever")", then b appears to be "[ ]" the same results as code having "list.__init__([ ])
5 Antworten
0
@James Why do you delete your answers? I ...
0
@James I am sorry. I shouldn't take that for granted