New submission from Max Rothman:
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.
----------
components: Library (Lib)
messages: 288929
nosy: Max Rothman
priority: normal
severity: normal
status: open
title: Arparse improperly handles "-_"
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29715>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com