This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: optparse - dosn't distinguish between '--option' and '-option'
Type: behavior Stage:
Components: Extension Modules Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: kszawala, mark.dickinson
Priority: normal Keywords:

Created on 2008-12-12 14:15 by kszawala, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg77669 - (view) Author: Krzysztof Szawala (kszawala) Date: 2008-12-12 14:15
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.
msg77680 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-12-12 17:29
Duplicate of issue #4640.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48891
2008-12-12 17:29:40mark.dickinsonsetstatus: open -> closed
resolution: duplicate
messages: + msg77680
nosy: + mark.dickinson
2008-12-12 14:15:17kszawalacreate