-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
In *args and **kwargs: Flexible Arguments section of the link, there is this paragraph:
Here it is not the names args and kwargs that are important, but the * characters preceding them. args and kwargs are just the variable names often used by convention, short for "arguments" and "keyword arguments". The operative difference is the asterisk characters: a single * before a variable means "expand this as a sequence", while a double ** before a variable means "expand this as a dictionary". In fact, this syntax can be used not only with the function definition, but with the function call as well!
This seems to be the first time that sequence concept is mentioned. Given that there are many types of sequences and the concept is worth an aside, would it be a good idea to link to Sequence Types in the Python documentation?
Not sure if it is worth weaving in the broader concept of sequences or re-phrasing to restrict the example to just tuples.
Metadata
Metadata
Assignees
Labels
No labels