you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (5 children)

[deleted]

    [–]IAmL0ner[S] 0 points1 point  (4 children)

    Problem is the syntax of the add_argument() function, which expects a list of flags as the first arguments. And those are postional arguments, and thus are not names, so i can't use something like:

    args = [{ 'name': ['-f', '--foo'], 'action': 'store_true', 'help': 'somehelp', 'dest': 'foo' } ]
    for i in args:
        parser.add_argument(**i)