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: getopt error doesnot display correct error
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, priya
Priority: normal Keywords:

Created on 2014-05-13 12:41 by priya, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg218447 - (view) Author: Priya pawar (priya) Date: 2014-05-13 12:41
i created command from getopt but it gives error if i give single hyphan in long option
it should check long option not in small option. 

eg.  hello -foo
 -o option is not recognized

hello --foo is working fine.
msg218449 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2014-05-13 13:10
That's working as designed. It allows you to say "-fo" if both 'f' and 'o' are short options.
History
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65693
2014-05-13 15:01:36eric.smithsetstatus: open -> closed
type: enhancement -> behavior
resolution: not a bug
stage: resolved
2014-05-13 13:10:11eric.smithsetnosy: + eric.smith
messages: + msg218449
2014-05-13 12:41:29priyacreate