mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-08-21 04:14:45 +03:00
docs(singleton.rst): fix grammar and added more clarity in singleton documentation (#917)
This commit is contained in:
parent
1500a1de36
commit
8932db3928
|
@ -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