Someone might be able to explain what is going on here. I've only started python today and it seems the constructor of my class is doing weird things. This is my constructor:
def __init__(self, studentid, fname, lname, gpa):
self.studentid = studentid
self.fname = fname
self.lname = lname
self.gpa = gpa
When I call
student = Student(1, 2, 3, 4, 5)
it throws an error: TypeError: init() takes exactly 5 arguments (6 given)
yet when I call
student = Student(1, 2, 3, 4)
it throws this error: TypeError: init() takes exactly 5 arguments (8 given)
...?
Student(1, 2, 3, 4)version?