Skip to content

Feature request: Optionally require all arguments to be named #71

Open

Description

@tiagoantao

A feature request: allow that even non-default parameters have to be named on call, for example:

import begin

@begin.start
def bla(x, y=2):
    print (x, y)

If called like without parameters, this will return:

usage: begins.py [-h] [--y Y] X
begins.py: error: too few arguments

The suggestion would be as follows:

import begin

@begin.start(all_named=True)
def bla(x, y=2):
    print (x, y)

begins would output:

usage: begins.py [-h] <--x X> [--y Y] 
begins.py: error: too few arguments

If this is found as a good idea, I could offer to implement it...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions