Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def foo(x, a, b): # generic function
- return a * x + b
- bar = foo(a=1., b=2.) # create some specific functions
- baz = foo(a=6., b=9.) # that specify some of the parameters
- bar(x=1) # returns 3, can be used without tracking a,b
- baz(x=1) # returns 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement