liveBook · Manning

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.

How 3 Manning books explain it

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.

Read how Python How-To explains named argument →

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.

Read how Kotlin in Action, 2E explains named argument →

Related concepts

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.