Bowl.add_scoops adds Scoop objects to a bowl while preserving the bowl’s ordered collection. It accepts any number of scoops in one call and can be called repeatedly. section 9.6 section 9.7
A capacity-aware implementation compares the current length of self.scoops with a class attribute such as max_scoops. Setting max_scoops on Bowl expresses one shared limit, avoids repeated literals, and lets the method ignore scoops beyond the first three. section 9.11 section 9.12
Referencing self.max_scoops instead of Bowl.max_scoops keeps the method reusable through inheritance. Bowl instances find the value on Bowl, while BigBowl instances can find an overridden value on BigBowl without duplicating add_scoops. section 9.17
Adding scoops in batches
Create chocolate, vanilla, and persimmon Scoop objects, add two with b.add_scoops(s1, s2), add the third with b.add_scoops(s3), and print the bowl. With a three-scoop limit, later additions are ignored. section 9.6 section 9.11
Visualizes max_scoops as a class attribute available even when a Bowl instance has no instance-level copy. section 9.12
