Skip to content

DOC: Documentation of passing multiple values in "option" vs "argument" isn't sufficiently explicit #554

Open
@corneliusroemer

Description

@corneliusroemer

Privileged issue

  • I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

I was looking into passing multiple (N>=1, all N >=1 allowed) white space separated values via an option.

This does not seem possible at the moment, but the documentation wasn't very clear. It's only possible to pass an exact number of space separated values via an option, but not a list: https://typer.tiangolo.com/tutorial/multiple-values/options-with-multiple-values/

Multiple values are only possible via argument, yet the documentation for the two types reads almost identical (at least the first few paragraphs): https://typer.tiangolo.com/tutorial/multiple-values/arguments-with-multiple-values/

It would be good to be precise in the first paragraph about the fact that options don't allow you to pass N>=1 values.

Maybe one could accept multiple values by specifying a separator that's not white space, like comma-separated - but that's a feature request in a bit different direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationfeatureNew feature, enhancement or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions