[New-bugs-announce] [issue9044] [optparse] confusion over an option and its value without any space in between

Krzysztof Szawala report at bugs.python.org
Mon Jun 21 18:05:31 CEST 2010


New submission from Krzysztof Szawala <kszawala at slb.com>:

Currently optparse library supports the following option definitions:
-e value,
-e=value,
-e:value,
-evalue.

Having said that let's consider the following option definition:
-e <string_value>.

Based on the above syntax the following statement will be correct:
-exclusive
and will be parsed into -e xclusive.
The fact that no caracter is required in between the option itself and its value leads to confusion.

My suggestion is to restrict the syntax to the following:
-e value,
-e=value,
-e:value.

Thanks,
Krzysztof

----------
components: Library (Lib)
messages: 108280
nosy: kszawala
priority: normal
severity: normal
status: open
title: [optparse] confusion over an option and its value without any space in between
type: feature request
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9044>
_______________________________________


More information about the New-bugs-announce mailing list