mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-24 10:34:01 +03:00
18 lines
326 B
Python
18 lines
326 B
Python
"""Car & Engine example."""
|
|
|
|
|
|
class Engine(object):
|
|
"""Example engine."""
|
|
|
|
|
|
class Car(object):
|
|
"""Example car."""
|
|
|
|
def __init__(self):
|
|
"""Initializer."""
|
|
self.engine = Engine() # Engine is a "hardcoded" dependency
|
|
|
|
|
|
if __name__ == '__main__':
|
|
car = Car() # Application creates Car's instance
|