mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-08-21 04:14:45 +03:00
Merge 8932db3928
into 1500a1de36
This commit is contained in:
commit
31a9ef3ee2
|
@ -33,8 +33,8 @@ factories:
|
||||||
- :ref:`factory-specialize-provided-type`
|
- :ref:`factory-specialize-provided-type`
|
||||||
- :ref:`abstract-factory`
|
- :ref:`abstract-factory`
|
||||||
|
|
||||||
``Singleton`` provider scope is tied to the container. Two different containers will provider
|
Since ``Singleton`` scope is container-specific, each container will create and manage its own ``Singleton`` instance.
|
||||||
two different singleton objects:
|
Therefore, two containers will provide two distinct ``Singleton`` objects.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/providers/singleton_multiple_containers.py
|
.. literalinclude:: ../../examples/providers/singleton_multiple_containers.py
|
||||||
:language: python
|
:language: python
|
||||||
|
|
Loading…
Reference in New Issue
Block a user