Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Lib/getopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ def __str__(self):
error = GetoptError # backward compatibility

def getopt(args, shortopts, longopts = []):
"""getopt(args, options[, long_options]) -> opts, args
"""Parse command line options and parameter list.

Parses command line options and parameter list. args is the
argument list to be parsed, without the leading reference to the
running program. Typically, this means "sys.argv[1:]". shortopts
args is the argument list to be parsed, without the leading reference
to the running program. Typically, this means "sys.argv[1:]". shortopts
is the string of option letters that the script wants to
recognize, with options that require an argument followed by a
colon and options that accept an optional argument followed by
Expand All @@ -72,7 +71,6 @@ def getopt(args, shortopts, longopts = []):
string if the option has no argument. The options occur in the
list in the same order in which they were found, thus allowing
multiple occurrences. Long and short options may be mixed.

"""

opts = []
Expand All @@ -92,7 +90,7 @@ def getopt(args, shortopts, longopts = []):
return opts, args

def gnu_getopt(args, shortopts, longopts = []):
"""getopt(args, options[, long_options]) -> opts, args
"""Parse command line options using GNU style scanning.

This function works like getopt(), except that GNU style scanning
mode is used by default. This means that option and non-option
Expand All @@ -103,7 +101,6 @@ def gnu_getopt(args, shortopts, longopts = []):
If the first character of the option string is '+', or if the
environment variable POSIXLY_CORRECT is set, then option
processing stops as soon as a non-option argument is encountered.

"""

opts = []
Expand Down
Loading