blob: e2c7f44ca49a8cdd743f12ba85d4405a926041fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
class Drink:
def mix(self, fluid_one, fluid_two):
return fluid_one + fluid_two
class Cocktail(Drink):
def mix(self, fluid_one, fluid_two, alcoholic_fluid_one): # [arguments-differ]
return fluid_one + fluid_two + alcoholic_fluid_one
class Car:
tank = 0
def fill_tank(self, gas):
self.tank += gas
class Airplane(Car):
kerosene_tank = 0
def fill_tank(self, gas, kerosene): # [arguments-differ]
self.tank += gas
self.kerosene_tank += kerosene
|