Skip to content

Instantly share code, notes, and snippets.

Varvara Malysheva Varvara-Gornostaeva

Block or report user

Report or block Varvara-Gornostaeva

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Varvara-Gornostaeva
Varvara-Gornostaeva / chain_of_responsibility_python.py
Last active Feb 27, 2019
Chain of responsibility Pattern in Python
View chain_of_responsibility_python.py
class Car:
def __init__(self):
self.name = None
self.km = 11100
self.fuel = 5
self.oil = 5
def handle_fuel(car):
if car.fuel < 10:
print "added fuel"
You can’t perform that action at this time.