| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
dependency
Data descriptor that provides a given dependency looking as an attribute. The depedency is specified as a keyword parameter, whose value can be a default accessor or None. The attribute only tries to fetch the dependency on deman when needed. Example:
class HttpServer(object):
connection_port = dependency(http_port = const(80))
server = HttpServer()
assert server.connection_port == 80
with inject(connection_port = const(8000)).everywhere():
assert server.connection_port == 8000
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Mar 6 18:53:31 2013 | http://epydoc.sourceforge.net |