This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ClassicalItem: | |
""" | |
The classical solution, there's nothing special about it, | |
but if we came from old implementation without this protection, | |
we would loose backwards compatibility, because `amount` attribute | |
wouldn't be accessible anymore. | |
""" | |
def __init__(self, description, amount, price): | |
self.description = description | |
self.set_amount(amount) |
NewerOlder