AI engineering glossary · Python advanced
What is self?
self: By convention, the name of the first parameter of an instance method. It receives the object the method was called on, so the method can read and modify that object's own data. It is a naming convention, not a keyword.
self: an example
In def deposit(self, amt): self.balance += amt, self is whichever account called deposit.
Related terms
More Python advanced terms
Where you learn it
self is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.