https://github.com/fabiosantoscode/python-dict-of-arguments
A decorator which gives you access to the arguments used to call your function (and defaults) as a dictionary.
https://github.com/fabiosantoscode/python-dict-of-arguments
Last synced: 10 months ago
JSON representation
A decorator which gives you access to the arguments used to call your function (and defaults) as a dictionary.
- Host: GitHub
- URL: https://github.com/fabiosantoscode/python-dict-of-arguments
- Owner: fabiosantoscode
- Created: 2013-04-26T07:21:31.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-24T19:03:30.000Z (over 12 years ago)
- Last Synced: 2025-01-17T22:45:39.315Z (about 1 year ago)
- Language: Python
- Size: 125 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
python-dict-of-arguments
========================
A decorator which gives you access to the arguments used to call your function (and defaults) as a dictionary.
How to use
----------
Decorate your function and add an `arg_dict` argument to it. Then you can access your function's parameters as a dict through it.
from arg_dict import arg_dict
@arg_dict
def foo(arg_dict, bar, baz=3):
arg_dict['bar'] += 1
arg_dict.update({'qux': 10})
return arg_dict