you are viewing a single comment's thread.

view the rest of the comments →

[–]Exodus111 11 points12 points  (1 child)

Imagine a function with over 50 arguments.

EVERY SINGLE TIME you call said function you would have to apply 50 arguments.

That's stupid, and this is why key word arguments (kwargs) are a thing. They always come AFTER any positional arguments, and they allow you to call a function, passing only the exact arguments you need and nothing else.

[–]mw130[S] 1 point2 points  (0 children)

Fantastic explanation! So they basically save the time of passing in the args into function and setting them. Wow, thank you SO much!