Named argument
A named argument is a function or command argument supplied by explicitly associating its value with a parameter name rather than relying solely on position.
Python Workout, Second Edition
A keyword argument is an argument passed by associating a value with a parameter name in a function call.
- How it is used
- Uses named arguments to make flexible functions accept optional values, attributes, menu options, and query criteria.
- How deep it goes
- Explains name-value syntax, default parameters, kwargs dictionary construction, iteration, and practical transformations.
- Examples
- Demonstrates XML attributes, dynamically constructed menus, and animal queries filtered by color or legs.
- What you can do after
- Apply it via Python function calls to design extensible interfaces and process caller-supplied options by name.
Read how Python Workout, Second Edition explains named argument →
Python How-To
A keyword argument is a function argument supplied by associating an explicit parameter name with its value.
- How it is used
- Uses named arguments to make reusable functions easier to call and understand.
- How deep it goes
- Explains identifier-based matching, ordering rules, flexible **kwargs, and invalid names without descending into interpreter internals.
- Examples
- Demonstrates multiply_numbers calls, print's named options, create_report with grades, and valid or invalid **kwargs calls.
- What you can do after
- Apply named arguments in function calls, combine them correctly with positional arguments, and define flexible interfaces with **kwargs.
Kotlin in Action, 2E
Named-argument syntax specifies function or constructor arguments by writing each argument's parameter name explicitly.
- How it is used
- Clarifies Kotlin function and constructor calls, especially those with many parameters or Boolean flags.
- How deep it goes
- Explains partial naming, complete-call reordering, default-value combinations, IDE refactoring, and Java annotation restrictions.
- Examples
- Uses joinToString calls, Person construction, and Kotlin-versus-Java annotation applications.
- What you can do after
- Apply named arguments to make Kotlin function, constructor, and annotation calls more readable and maintainable.
Related concepts
- positional argumentcontrasts with · A positional argument is a function argument associated with a parameter according to its ordinal position in the call rather than its name.
- **kwargsused by · **kwargs is Python function-parameter syntax that collects arbitrary keyword arguments into a dictionary keyed by their names.
- functionuses · A function is a callable program unit that performs an operation, may accept inputs, and can produce a result or side effect.
- required argumentincludes · A required argument is an input value that must be supplied for a function, command, operation, or request to be valid.
- format methodused by · A format method is an API operation that produces a formatted representation by substituting supplied values into a formatting specification.
- parameter bindingcontrasts with · Parameter binding is PowerShell's process of mapping supplied arguments or pipeline objects to a command's parameters.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


