June 2019
Beginner to intermediate
770 pages
19h 24m
English
In this chapter, we have reviewed the various design alternatives of the __init__() method. The __init__() method is how objects are created, and it sets the initial state of an object.
We've looked at how all Python objects are subclasses of a common parent, the object class, and how the default __init__() method for the object class works. This consideration leads to two design strategies for placement of the __init__() method:
Read now
Unlock full access