What is the purpose of the "self" keyword when defining or calling instance methods?
self means that no other arguments are required to be passed into the method.
self
There is no real purpose for the self method; it's just historic computer science jargon that Python keeps to stay consistent with other programming languages.
self refers to the instance whose method was called.
self refers to the class that was inherited from to create the object using self. Simple example
class my_secrets: def __init__(self, password): self.password = password pass instance = my_secrets('1234') instance.password >>>'1234'