updating readme

This commit is contained in:
Roman Mogilatov 2015-01-11 18:14:15 +02:00
parent 98435c953f
commit 2bfdae8949
3 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ assert b1 is not b2
assert a1.db is a2.db is b1.db is b2.db is AppCatalog.database() assert a1.db is a2.db is b1.db is b2.db is AppCatalog.database()
# Dependency injection (The Python Way) into class. # Dependencies injection (The Python Way) into class.
class Consumer(object): class Consumer(object):
dependencies = AppCatalog(AppCatalog.object_a, dependencies = AppCatalog(AppCatalog.object_a,
@ -86,7 +86,7 @@ class Consumer(object):
Consumer().test() Consumer().test()
# Dependency injection (The Python Way) into a callback. # Dependencies injection (The Python Way) into a callback.
def consumer_callback(dependencies=AppCatalog(AppCatalog.object_a, def consumer_callback(dependencies=AppCatalog(AppCatalog.object_a,
AppCatalog.object_b)): AppCatalog.object_b)):
a1 = dependencies.object_a() a1 = dependencies.object_a()

View File

@ -1 +1 @@
0.0.4 0.0.5

View File

@ -49,7 +49,7 @@ assert b1 is not b2
assert a1.db is a2.db is b1.db is b2.db is AppCatalog.database() assert a1.db is a2.db is b1.db is b2.db is AppCatalog.database()
# Dependency injection (The Python Way) into class. # Dependencies injection (The Python Way) into class.
class Consumer(object): class Consumer(object):
dependencies = AppCatalog(AppCatalog.object_a, dependencies = AppCatalog(AppCatalog.object_a,
@ -77,7 +77,7 @@ class Consumer(object):
Consumer().test() Consumer().test()
# Dependency injection (The Python Way) into a callback. # Dependencies injection (The Python Way) into a callback.
def consumer_callback(dependencies=AppCatalog(AppCatalog.object_a, def consumer_callback(dependencies=AppCatalog(AppCatalog.object_a,
AppCatalog.object_b)): AppCatalog.object_b)):
a1 = dependencies.object_a() a1 = dependencies.object_a()