Skip to content

Glossary: Data Structures and Algorithms

self

Also written: __init__

Inside a method, `self` is the object the method was called on, passed in by Python automatically. `__init__` is the special method that runs once to set up a new object.

Where the book teaches it

Related terms

ClassMethodAttribute