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.
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.
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.
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.
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.
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
- file pathincludes · A file path is a textual or structured identifier specifying the location of a file or directory in a filesystem.
- filteringincludes · Filtering is the operation of selecting or excluding items from data or a collection according to specified criteria.
- command-line argumentcontrasts with · A command-line argument is a value supplied to a program when it is invoked, either as positional input or as an option that configures its behavior.
- nargsconfigured by · nargs is an argparse parameter that specifies how many command-line values an option or positional argument accepts.
- parameter bindingcontrasts with · Parameter binding is PowerShell's process of mapping supplied arguments or pipeline objects to a command's parameters.
- inputkind of · An input is a value, information, or signal supplied to a system, computation, or interface for processing or to influence its behavior.
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.




