[Patches] [ python-Patches-473512 ] getopt with GNU style scanning

noreply@sourceforge.net noreply@sourceforge.net
Sat, 24 Nov 2001 02:10:31 -0800


Patches item #473512, was opened at 2001-10-21 14:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=473512&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
>Resolution: Postponed
Priority: 5
Submitted By: Peter Åstrand (astrand)
Assigned to: Nobody/Anonymous (nobody)
Summary: getopt with GNU style scanning

Initial Comment:
Implements GNU style scanning mode. The traditional
mode is used if the option string begins with + or if
the environment variable POSIXLY_CORRECT is set, just
like GNU getopt. 

Patch includes updated documentation and test. 


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-11-24 02:10

Message:
Logged In: YES 
user_id=21627

The patch looks good to me. Since it introduces a new
feature,  it will be postponed after 2.2 (negotiate with the
2.2 release manager if you want to see it included).

Notice that it doesn't offer all features of GNU getopt. It
doesn't support the getopt_long_only mechanism (where all
options are long, even if they have a single - only).
Further, it doesn't allow the caller to specify ordering,
and it doesn't support the RETURN_IN_ORDER option (which
would be difficult to support with the current calling
convention, though).

I'm not asking that these problems are somehow resolved;
they are meant as proposals for improvements only.

----------------------------------------------------------------------

Comment By: Peter Åstrand (astrand)
Date: 2001-11-11 08:09

Message:
Logged In: YES 
user_id=344921

The new patch uses a new function, gnu_getopt, instead of changing the default behaviour. 

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-10-21 17:37

Message:
Logged In: YES 
user_id=6380

Rejected in this form.  We can't suddenly change the default
behavior.  If you want a way to support GNU style options
(which I personally hate, but which I would accept as an
option), try adding a different function (e.g.
gnu_getopt(...)) or add a flag argument (e.g. getopt(...,
gnu=1)).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=473512&group_id=5470