mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 03:36:41 +03:00
Minor fixes in singleton docs
This commit is contained in:
parent
7f439137d6
commit
ef41688e61
|
@ -73,8 +73,7 @@ lifecycle of memorized instance is out of ``Singleton`` provider's control.
|
|||
"""Example class UserService."""
|
||||
|
||||
|
||||
# Singleton provider creates new instance of specified class on first call and
|
||||
# returns same instance on every next call.
|
||||
# Users service singleton provider:
|
||||
users_service_provider = Singleton(UserService)
|
||||
|
||||
# Retrieving several UserService objects:
|
||||
|
|
|
@ -8,8 +8,7 @@ class UserService(object):
|
|||
"""Example class UserService."""
|
||||
|
||||
|
||||
# Singleton provider creates new instance of specified class on first call and
|
||||
# returns same instance on every next call.
|
||||
# Users service singleton provider:
|
||||
users_service_provider = Singleton(UserService)
|
||||
|
||||
# Retrieving several UserService objects:
|
||||
|
|
Loading…
Reference in New Issue
Block a user