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 Max Rothman
Recipients Max Rothman
Date 2017-03-03.21:07:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za>
In-reply-to
Content
In the case detailed below, argparse.ArgumentParser improperly parses the argument string "-_":
```
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('first')
print(parser.parse_args(['-_']))
```

Expected behavior: prints Namespace(first='-_')
Actual behavior: prints usage message

The issue seems to be specific to the string "-_". Either character alone or both in the opposite order does not trigger the issue.
History
Date User Action Args
2017-03-03 21:07:15Max Rothmansetrecipients: + Max Rothman
2017-03-03 21:07:15Max Rothmansetmessageid: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za>
2017-03-03 21:07:15Max Rothmanlinkissue29715 messages
2017-03-03 21:07:15Max Rothmancreate