Closed GoogleCodeExporter closed 9 years ago
Seems like there's some disagreement on what is the right behavior here. Take a
look
at issue10, which suggests that the following should be parsed as a positional
an
optional and a positional:
foo --bar '-r is an option string'
I don't have a good intuition for which one makes more sense. Note that you can
work
around your issue with something like:
parser.parse_args(['--foo', 'bar baz'])
Original comment by steven.b...@gmail.com
on 21 Jul 2009 at 2:57
I looked at this a little longer, and I think your patch is okay. Before, if an
argument contained a space, it was always a positional. Now, if it contains a
space,
it's a positional only if it doesn't start with an optional declared in the
parser.
That's a little harder to explain, but probably more useful behavior.
I committed your patch in r35.
Original comment by steven.b...@gmail.com
on 26 Jul 2009 at 3:17
Original issue reported on code.google.com by
zhir...@gmail.com
on 17 Jul 2009 at 8:28Attachments: