I came by a code and wanted to get more understanding on when to use such arrangement.
What would be a good scenario of not using __init__
's argument (name
) in self
?
class ArgumentNotUsedInSelf:
def __init__(self, name: str):
self.type = "user"
user_one = ArgumentNotUsedInSelf("Mike")
print(user_one.type)
Any explanations from architectural (and not only) point of view are most welcome!
Some of the reasons for this can be: