Updating singleton examples

This commit is contained in:
Roman Mogilatov 2015-07-20 18:58:39 +03:00
parent 2690d9b9d4
commit 996fc4ecbf
3 changed files with 0 additions and 6 deletions

View File

@ -21,7 +21,6 @@ Example:
"""Example class UserService."""
# Singleton provider creates new instance of specified class on first call and
# returns same instance on every next call.
users_service_provider = Singleton(UserService)
@ -35,7 +34,6 @@ Example:
assert isinstance(user_service1, UserService)
assert isinstance(user_service2, UserService)
Singleton providers and injections
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -84,7 +82,6 @@ Example:
"""Example class UserService."""
# Users service singleton provider:
users_service_provider = Singleton(UserService)
@ -105,4 +102,3 @@ Example:
# Making some asserts:
assert user_service3 is not user_service1

View File

@ -7,7 +7,6 @@ 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_provider = Singleton(UserService)

View File

@ -7,7 +7,6 @@ class UserService(object):
"""Example class UserService."""
# Users service singleton provider:
users_service_provider = Singleton(UserService)