[New-bugs-announce] [issue4641] optparse - dosn't distinguish between '--option' and '-option'

Krzysztof Szawala report at bugs.python.org
Fri Dec 12 15:15:17 CET 2008


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

I am using optparse for command-line parameters parsing. To follow 
common naming convention I defined -d (minus followed by a single 
character option) and --debug (double minus followed by a word).

It looks like optparse doesn't complain when -debug (single minus) is 
specified and morover it doesn't recognize it as --debug.

I am using Python 2.5.2. Problem was observed on Linux but also occurs 
on Windows.

----------
components: Extension Modules
messages: 77669
nosy: kszawala
severity: normal
status: open
title: optparse - dosn't distinguish between '--option' and '-option'
type: behavior
versions: Python 2.5

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


More information about the New-bugs-announce mailing list