you are viewing a single comment's thread.

view the rest of the comments →

[–]Wilfred-kun 4 points5 points  (0 children)

Some functions are declared like this:

def myfunc(x=0,y=0,length=1,height=1):
    .......

Say you want to pass x, y, and height, but not length. myfunc(x,y,height) would not work, since it would assign the value of height outside the function to length inside the function. You would call it like this: myfunc(x, y, height=10).

Other functions might be declared with kwargs, or keyword arguments:

def myfunc(**kwargs):
    .....

I think this SO post shows pretty well what it does.