Skip to content

mishadobrits/kwargs_decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example explains the purpose of this project
test.py

from kwargs_decorator import kwargs_decorator_generator


@kwargs_decorator_generator("""
    a,
    b,
    c= a+b,
    d=a+b,
    e =a+b,
    f = c*3,
    g=d*3, 
    h = e * 3
""")
def f(a, b, c, d, e, f, g, h):
    print(f"a = {a}\nb = {b}\nc = {c}\nd = {d}\ne = {e}\nf = {f}\ng = {g}\nh = {h}")


f("x", "z", 0, e=5)

The output would be

a = x
b = z
c = 0
d = xz
e = 5
f = 0
g = xzxzxz
h = 15```

About

Makes usage of default value more comfortable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages