June 2019
Beginner to intermediate
770 pages
19h 24m
English
In most cases, attributes can be set outside a class with no adverse consequences. Our example of the Hand class shows this. For many versions of the class, we can simply append to hand.cards, and the lazy computation of total via a property will work perfectly.
In cases where the changing of an attribute should lead to consequential changes in other attributes, a more sophisticated class design is required:
Read now
Unlock full access