python-dependency-injector/examples/ioc_di_demos/car_engine.py

18 lines
288 B
Python
Raw Normal View History

2016-04-26 13:14:39 +03:00
"""Car & Engine example."""
2016-04-01 10:47:09 +03:00
class Engine(object):
"""Example engine."""
class Car(object):
"""Example car."""
def __init__(self):
"""Initializer."""
self.engine = Engine()
if __name__ == '__main__':
2016-04-26 13:14:39 +03:00
car = Car() # Application creates Car's instance