Closed scharf closed 10 years ago
I have tried to patch the original @param wrapper but the problem is, that it is quite hard to get to the original function (one could use function attributes to pass the original function to the next param) when multiple @param are used. And constructing the position argument tuple, may be quite a challenge, but possible...
Previous version of python-inject
supported positional args via function attrs. However, I never actually used them, so I got rid of them.
I like @inject.params(arg1=cls, arg2=cls2)
. It is better than @inject.param
. I will deprecate the latter.
Thanks for a good pull-request. I have uploaded a new version to pypi, see https://pypi.python.org/pypi/Inject/3.3.0
Thank you for merging my pull-request. I really like python-inject for of its simplicity.
I added @params to solve the problems in issue ivankorobkov/python-inject#12
@params uses keyword parameters to inject parameters into functions (see unittests)