table - summarizes the syntax that invokes the special argument-matching modes table - function argument-matching forms syntax location interpretation func(valuecaller normal argumentmatched by position func(name=valuecaller keyword argumentmatched by name func(*iterablecaller pass all objects in iterable as individual positional arguments func(**dictcaller pass all key/value pairs in dict as individual keyword arguments def func(namefunction normal argumentmatches any passed value by position or name def func(name=valuefunction default argument valueif not passed in the call def func(*namefunction matches and collects remaining positional arguments in tuple def func(**namefunction matches and collects remaining keyword arguments in dictionary def func(*othernamefunction arguments that must be passed by keyword only in calls ( xdef func(*name=valuefunction arguments that must be passed by keyword only in calls ( xthese special matching modes break down into function calls and definitions as followsin function call (the first four rows of the table)simple values are matched by positionbut using the name=value form tells python to match by name to arguments insteadthese are called keyword arguments using *iterable or **dict in call allows us to package up arbitrarily many positional or keyword objects in sequences (and other iterablesand dictionariesrespectivelyand unpack them as separateindividual arguments when they are passed to the function in function header (the rest of the table) simple name is matched by position or name depending on how the caller passes itbut the name=value form specifies default value the *name form collects any extra unmatched positional arguments in tupleand the **name form collects extra keyword arguments in dictionary in python xany normal or defaulted argument names following *name or bare are keyword-only arguments and must be passed by keyword in calls of thesekeyword arguments and defaults are probably the most commonly used in python code we've informally used both of these earlier in this bookwe've already used keywords to specify options to the print functionbut they are more general--keywords allow us to label any argument with its nameto make calls more informational we met defaults earliertooas way to pass in values from the enclosing function' scopebut they are also more general--they allow us to make any argument optionalproviding its default value in function definition arguments