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_long_only()
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: draghuram, jlgijsbers, loewis, s3a
Priority: normal Keywords: patch

Created on 2003-08-06 15:25 by s3a, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-longonly s3a, 2003-08-06 15:25 patch for Lib/getopt.py
patch-longonly s3a, 2003-11-18 14:20 patching Lib/getopt.py & Doc/lib/libgetopt.tex
Messages (6)
msg44402 - (view) Author: Souza (s3a) Date: 2003-08-06 15:25
A getopt_long_only() implementation for the `getopt'
module.

Note that it has one slight difference from the glibc
version, related to the `-W' behavior, in that it
_really_ treats `-W foo' _as_ `--foo'; therefore, when
`foo' is not a valid long option, this is an error ---
rather than returning the option ('-W', 'foo') as
though `W:' instead of `W;' had been specified.
msg44403 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2003-08-28 18:17
Logged In: YES 
user_id=469548

I'm not sure we want to support this: our new option-parsing
library optparse rejects this behavior (see
http://python.org/doc/current/lib/optparse-terminology.html),
and our gnu_getopt wasn't intended to work exactly like
gnu_getopt (see http://python.org/sf/473512). On the other
hand, your patch seems to work well, although you should add
tests and a documentation patch.
msg44404 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-31 13:08
Logged In: YES 
user_id=21627

I see no harm in adding this function. However, the patch is
incomplete: it lacks changes to Doc/lib/libgetopt.tex. s3a,
can you please provide these changes?
msg44405 - (view) Author: Souza (s3a) Date: 2003-11-07 17:25
Logged In: YES 
user_id=838988

I shall add a doc/test patch (within some days).
msg44406 - (view) Author: Souza (s3a) Date: 2003-11-13 17:25
Logged In: YES 
user_id=838988

The patch now includes changes to Doc/lib/libgetopt.tex.
msg61688 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-01-25 20:19
I see no chance of this being accepted now that optparse is entrenched.
Please do reopen if some one thinks otherwise.
History
Date User Action Args
2022-04-10 16:10:31adminsetgithub: 39026
2008-01-25 20:19:12draghuramsetstatus: open -> closed
nosy: + draghuram
resolution: rejected
messages: + msg61688
2003-08-06 15:25:03s3acreate