This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients Leon Avery, paul.j3, steven.daprano
Date 2017-08-01.07:13:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
argparse roughly follows POSIX practice:

    Guideline 10:
    The first -- argument that is not an option-argument should be 
    accepted as a delimiter indicating the end of options. Any 
    following arguments should be treated as operands, even if they 
    begin with the '-' character.

I don't think this kind of thing is fixed, but there should be good reason to make an enhancement.  For many users argparse is already too complicated, and the docs are hard to understand.  Yet another parameter can get lost.

There are some known problems with this '--', specially when there are more than one.  It may also have problems when used with subparers, though I forget the details.

It wouldn't hard to substitute a CONST variable for this '--', and wouldn't require changes to the API.  

Another possibility is to change this '--' to 'parser.prefix_chars[0]*2'.  Documenting that would be more work than implementing it.  And we'd have to add a unittest case.
Date User Action Args
2017-08-01 07:13:10paul.j3setrecipients: + paul.j3, steven.daprano, Leon Avery
2017-08-01 07:13:10paul.j3setmessageid: <>
2017-08-01 07:13:10paul.j3linkissue31012 messages
2017-08-01 07:13:09paul.j3create