DEV Community

Discussion on: What does this mean in Python: *args, **kwargs?

Collapse
 
swiknaba profile image
Lud

For some it might be obvious, for some not. Here is the naming explained:

args: arguments
kwargs: keyword arguments

Also, this might be familiar, if you are learning Ruby, as it has the same syntax :-)

Collapse
 
mojemoron profile image
Micheal Ojemoron • Edited

Thanks for the feedback

Collapse
 
rudolfolah profile image
Rudolf Olah

It's funny, but from much of the Ruby code I've seen in production code bases, most of them do not take advantage of keyword arguments. They still use the options hash style. With Python it seems much more idiomatic to use keyword arguments.

Collapse
 
mburszley profile image
Maximilian Burszley

I mean, they're basically the same thing. Just two different styles.