liveBook · Manning

Positional parameter

A positional parameter is a command or function parameter whose value or meaning is determined by its position among supplied arguments rather than an explicit name.

How 5 Manning books explain it

Tiny Python Projects: Learn coding and testing with puzzles and games

A command-line parameter whose meaning is determined by its position in the argument sequence rather than by an option name.

How it is used
Uses positional parameters to define required command-line input for small Python programs and exercises.
How deep it goes
Explains naming, ordering, requiredness, nargs='+' and nargs='*', lists, help output, and validation, without descending into argparse internals.
Examples
Demonstrates word, text, letter, item, and file arguments through greeting, picnic, lookup, file-reading, and string-replacement programs.
What you can do after
Build command-line interfaces that parse, validate, document, and consume one or more positional values.

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains positional parameter →

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

A positional parameter is a command or script parameter whose value can be supplied by its position without naming the parameter explicitly.

How it is used
Speeds up frequently used PowerShell commands by allowing values without repeatedly typing parameter names.
How deep it goes
Explains syntax markers, position numbers, ordering rules, mixed usage, and readability tradeoffs without covering parameter binding internals.
Examples
Demonstrates Get-Item, Get-ChildItem, Get-Help, and Get-DiskInventory.ps1 with positional and named forms.
What you can do after
Apply it via PowerShell by reading help syntax, supplying positional values correctly, and choosing named parameters for durable scripts.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains positional parameter →

The Well-Grounded Python Developer: How the pros use Python and Flask

A positional parameter is a function parameter whose value is assigned according to its position among the supplied arguments.

How it is used
Defines input order as part of a Python function’s API contract.
How deep it goes
Works through definition and call order, named calls, and missing required values without descending into function internals.
Examples
Uses full_name calls with ordered or named arguments and print calls with multiple objects.
What you can do after
Build it from scratch by defining required function inputs in a clear order and calling them accordingly.

Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains positional parameter →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

Positional parameter binding assigns arguments to command parameters according to their declared positions.

How it is used
Explains how PowerShell supplies command input during invocation and pipeline execution.
How deep it goes
Defines positional binding, explains its precedence in binding order, and traces execution without detailing parameter implementation internals.
Examples
Uses Get-Service, Where-Object, ConvertTo-HTML, and Trace-Command examples to expose and trace implicit binding.
What you can do after
Diagnose command behavior by expanding omitted parameter names and tracing ParameterBinding activity.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains positional parameter →

Go in Practice, Second Edition

A positional argument is a command-line value interpreted according to its position rather than an option name.

How it is used
Uses argument position to supply command-specific values in Cobra command-line applications.
How deep it goes
Defines extraction and demonstrates two operands, but does not detail validation or argument-count handling.
Examples
Demonstrates first-argument extraction and an add command receiving number1 and number2 as positional operands.
What you can do after
Apply positional arguments by extracting values from Cobra's command argument slice and passing them to application logic.

Read how Go in Practice, Second Edition explains positional parameter →

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.