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.

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

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

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