mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-26 19:43:58 +03:00
19 lines
366 B
Python
19 lines
366 B
Python
|
"""The Code."""
|
||
|
|
||
|
|
||
|
class Service(object):
|
||
|
"""Some "Service"."""
|
||
|
|
||
|
|
||
|
class Client(object):
|
||
|
"""Some "Client" that uses "Service"."""
|
||
|
|
||
|
def __init__(self):
|
||
|
"""Initializer."""
|
||
|
self.service = Service() # Service instance is created inside Client
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
# Application just creates Client's instance
|
||
|
client = Client()
|