Your Student_Record.__init__()
method takes two arguments, self
and s
. self
is provided for you by Python, but you failed to provide s
.
You are ignoring s
altogether, drop it from the function signature:
class Student_Record(object):
def __init__(self):
self.s = "class_Library"
print"Welcome!! take the benifit of the library"
Next, you are calling the method rec.Student_details()
passing in an argument, but that method only takes self
, which is already provided for you by Python. You don't need to pass it in manually, and in your case the name is not even defined in that scope.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…