2.9 Recall
Some key points in this chapter are as follows:
-
Python has optional type hints to help describe how data objects are related and what the parameters should be for methods and functions.
-
We create Python classes with the class statement. We should initialize the attributes in the special __init__() method.
-
Modules and packages are used as higher-level groupings of classes.
-
We need to plan out the organization of module content. While the general advice is ”flat is better than nested,” there are a few cases where it can be helpful to have nested packages.
-
Python has no notion of ”private” data. We often say ”we’re all adults here”; we can see the source code, and private declarations aren’t very helpful. This doesn’t change our design; it simply removes the need for...