summaryrefslogtreecommitdiff
path: root/doc/data/messages/a/arguments-renamed/good.py
blob: de6583806b84eb2ee3f68c0f65aeb91c2f0294de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)