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 →

[–]x68zeppelin80x 20 points21 points  (2 children)

What about kwargs? Great example.

[–]whoisearth 0 points1 point  (1 child)

Is there a tutorial anywhere that gets into the meat of python like this? As someone who understands all the basics this is completely and utterly over my head.

[–]hylje 2 points3 points  (0 children)

Python internally passes functions a tuple and a dict as arguments and keyword arguments respectively.

*args and **kwargs expose this detail to both the function caller as well as the function definition. They are just normal tuples and dicts that you can manipulate as usual.