This is my code:
class Person:
def __init__(self, name):
self.name = name
class Student(Person):
def register(self, school):
pass
def payfee(self, money):
pass
def chooseClassAndGrand(self, obj):
pass
class Teacher(Person):
pass
I want to add a class instance property to the Student class, how to do with that in the Student class code, if I do not want to rewrite the __init__() method?
classis a reserved keyword and will throw errors. You need to have a different name for the propertyclassAndGrade