This commit is contained in:
Okot Daniel 2025-08-12 21:55:37 +03:00 committed by GitHub
commit 31a9ef3ee2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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