mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Merged revisions 67463,67572,67576,67628 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67463 | skip.montanaro | 2008-12-01 02:55:22 +0100 (Mon, 01 Dec 2008) | 1 line typo in comment ........ r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines #4458: recognize "-" as an argument, not a malformed option in gnu_getopt(). ........ r67576 | georg.brandl | 2008-12-05 13:09:41 +0100 (Fri, 05 Dec 2008) | 2 lines #4529: fix parser's validation for try-except-finally statements. ........ r67628 | skip.montanaro | 2008-12-07 03:16:00 +0100 (Sun, 07 Dec 2008) | 1 line muffed the default case ........
This commit is contained in:
parent
6485f247e4
commit
eee3116690
6 changed files with 49 additions and 25 deletions
|
@ -130,7 +130,7 @@ def gnu_getopt(args, shortopts, longopts = []):
|
|||
|
||||
if args[0][:2] == '--':
|
||||
opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
|
||||
elif args[0][:1] == '-':
|
||||
elif args[0][:1] == '-' and args[0] != '-':
|
||||
opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
|
||||
else:
|
||||
if all_options_first:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue