New GitHub issue #95468 from Nikratio:<br>
<hr>
<pre>
Consider this:
```
import argparse
p = argparse.ArgumentParser()
p.add_argument('arg1', type=str)
p.add_argument('args', nargs='*')
p.parse_args(['foo', '--', '--bar', '--', 'com'])
```
The semantics of `--` are to not attempt to parse the remaining command line options as parameters. Therefore, the expected output is:
```
Namespace(arg1='foo', args=['--bar', '--', 'com'])
```
However, the actual output is:
```
Namespace(arg1='foo', args=['--bar', 'com'])
```
In other words, the second `--` has silently been dropped.
Interestingly enough, if the `arg1` parameter is dropped, this works correctly:
```
p = argparse.ArgumentParser()
p.add_argument('args', nargs='*')
p.parse_args(['foo', '--', '--bar', '--', 'com'])
--> Namespace(args=['foo', '--bar', '--', 'com'])
```
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/95468">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>