I have a Child init function that takes in arguments and passes those to the parent function. However if the user passes in a ‘token’ param to the child class, I don’t want that to be passed to the init function for the parent since the parent doesn’t have a ‘token’ field. Is there a way I can do this?
class Child(Parent):
def __init__(self, values=None, token=None) -> None:
super().__init__(values)
self.token = token
Right now it’s showing me this error: TypeError: Child.init() got an unexpected keyword argument ‘token’