Skip to content

Glossary: Python Beyond the Basics

__init__

Also written: constructor

A special method Python runs automatically when a new object is created. It sets up the object's starting attributes, such as a GiftCard's owner and balance.

Where the book teaches it

Related terms

attributeselfspecial method