We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11113ea commit af6fc3eCopy full SHA for af6fc3e
patterns/behavioral/strategy.py
@@ -55,7 +55,9 @@ def apply_discount(self) -> float:
55
return self.price - discount
56
57
def __repr__(self) -> str:
58
- return f"<Order price: {self.price} with discount strategy: {getattr(self.discount_strategy,'__name__',None)}>"
+ return f"""
59
+ <Order price: {self.price} with discount strategy: {getattr(self.discount_strategy, '__name__', None)}>
60
+ """
61
62
63
def ten_percent_discount(order: Order) -> float:
0 commit comments