summaryrefslogtreecommitdiff
path: root/doc/data/messages/a/arguments-renamed/good.py
blob: 0cd1db75608cc5e23e9b5e9b235d3a0a0da30245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Fruit:
    def brew(self, ingredient_name: str):
        print(f"Brewing a {type(self)} with {ingredient_name}")

class Apple(Fruit):
    ...

class Orange(Fruit):
    def brew(self, ingredient_name: str):
        print(f"Brewing an orange with {ingredient_name}")

for fruit, ingredient_name in [[Orange(), "thyme"], [Apple(), "cinnamon"]]:
    fruit.brew(ingredient_name=ingredient_name)