Keyword arguments not assigned

I see functions invoked as

a, b = fun(x; year=1000,  rate)

The keyward argument ‘rate’ is not assigned a value. So it will take its preassigned value, right?

That is the same as passing rate=rate, assuming you have a variable named rate defined already.

4 Likes

Indeed, in the code, ‘rate’ has an assigned value before this line.

So it will take its preassigned value, right?

no.

1 Like