Update DI in Python page

This commit is contained in:
Roman Mogylatov 2020-07-18 00:16:11 -04:00
parent 6aee30ea15
commit 0a81d19b72
2 changed files with 3 additions and 7 deletions

View File

@ -103,19 +103,16 @@ Listing of ``example.engines`` module:
.. literalinclude:: ../../examples/miniapps/engines_cars/example/engines.py
:language: python
:linenos:
Listing of ``example.cars`` module:
.. literalinclude:: ../../examples/miniapps/engines_cars/example/cars.py
:language: python
:linenos:
Next example demonstrates creation of several cars with different engines:
.. literalinclude:: ../../examples/miniapps/engines_cars/example_di.py
:language: python
:linenos:
While previous example demonstrates advantages of dependency injection, there
is a disadvantage demonstration as well - creation of car requires additional
@ -128,7 +125,6 @@ using :doc:`Dependency Injector <../index>`:
.. literalinclude:: ../../examples/miniapps/engines_cars/example_ioc_containers.py
:language: python
:linenos:
Useful links
~~~~~~~~~~~~

View File

@ -4,8 +4,8 @@
class Engine:
"""Example engine base class.
Engine is a heart of every car. Engine is a very common term and could be
implemented in very different ways.
Engine is a heart of every car. Engine is a very common term and
could be implemented in very different ways.
"""