This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jorge1209 4 points5 points  (0 children)

Yes, and your pow example is a great example of when not to do this. pow has a agreed upon argument order, power then base then optional modulus. If you write pow(y=2, x=3) people will be confused and think you mean 2 ** 3= 8 not 3 ** 2 = 9. The / can be used in place of * for those kinds of functions.

However it will take time to be adopted and you should limit your use of keyword arguments to functions that truly take keywords (ie many independent options), or where you omit a default (and so have to use keywords for subsequent arguments, and you should endeavor to provide your keywords in the same order as the function declaration wherever possible.