Dynamically declare and hide function or method arguments
- Free software: MIT license
- Documentation: https://dynarg.readthedocs.io.
- TODO
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Dynamically declare and remove function and method arguments
License: MIT License
Dynamically declare and hide function or method arguments
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Wrapping a function with dynarg removes all of its argument names:
dynarg(f(x1, x2), {'x1':0}) = f_dynarg(*args)
@dynarg_decor({'a':10}, verbose=True)
def add(a, b, c):
return a + b + c
print add(5, 1)
decor = dynarg(add, {'b':10}, verbose=True)
print decor(5)
/usr/bin/python2.7 /home/noitapicname/pycharmprojects/dynarg/dynarg/dynarg.py
Traceback (most recent call last):
decorator received function 'add'
File "/home/noitapicname/pycharmprojects/dynarg/dynarg/dynarg.py", line 53, in
with local variables: ('a', 'b', 'c')
print decor(5)
and arguments: ['a', 'b', 'c']
Fixed arguments: [('a', 10)]
New input arguments for 'add': ['b', 'c']
File "/home/noitapicname/pycharmprojects/dynarg/dynarg/dynarg.py", line 36, in wrapper
{'c': 1, 'b': 5}
return function(**all_variables)
TypeError: wrapper() got an unexpected keyword argument 'b'
16
decorator received function 'add_dynarg'
with local variables: ('dynamic_vars_vals', 'dynamic_vars_dict', 'all_variables')
and arguments: []
Fixed arguments: [('b', 10)]
New input arguments for 'add_dynarg': []
{}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.