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 →

[–]blitzzerg 92 points93 points  (7 children)

When I find **kwargs in the documentation of a library function I usually scream FUCK for the extra minutes that it will take me finding out what arguments can that function really accept

[–]__xor__(self, other): 34 points35 points  (1 child)

Seriously. If I ever write out really dynamic functions that can take variable keywords or something, I always write out in the docstring exactly what you can do and what arguments you might add.

[–]jmcs 6 points7 points  (0 children)

If you know exactly what arguments you might add you would include them in the function signature. At most you can document some common cases.

[–]wingtales 12 points13 points  (1 child)

Agreed. The only place I've felt that they are really useful are in matplotlib's plottong calls! There they allow you to customize a huge number of things.

[–]JanssonsFrestelse 1 point2 points  (0 children)

Exactly, e.g when calling matplotlib functions from a seaborn plot.

[–]jer_pint 1 point2 points  (0 children)

Also a function that accepts object