@@ -47,11 +47,10 @@ def __str__(self):
4747error = GetoptError # backward compatibility
4848
4949def getopt (args , shortopts , longopts = []):
50- """getopt(args, options[, long_options]) -> opts, args
50+ """Parse command line options and parameter list.
5151
52- Parses command line options and parameter list. args is the
53- argument list to be parsed, without the leading reference to the
54- running program. Typically, this means "sys.argv[1:]". shortopts
52+ args is the argument list to be parsed, without the leading reference
53+ to the running program. Typically, this means "sys.argv[1:]". shortopts
5554 is the string of option letters that the script wants to
5655 recognize, with options that require an argument followed by a
5756 colon and options that accept an optional argument followed by
@@ -72,7 +71,6 @@ def getopt(args, shortopts, longopts = []):
7271 string if the option has no argument. The options occur in the
7372 list in the same order in which they were found, thus allowing
7473 multiple occurrences. Long and short options may be mixed.
75-
7674 """
7775
7876 opts = []
@@ -92,7 +90,7 @@ def getopt(args, shortopts, longopts = []):
9290 return opts , args
9391
9492def gnu_getopt (args , shortopts , longopts = []):
95- """getopt(args, options[, long_options]) -> opts, args
93+ """Parse command line options using GNU style scanning.
9694
9795 This function works like getopt(), except that GNU style scanning
9896 mode is used by default. This means that option and non-option
@@ -103,7 +101,6 @@ def gnu_getopt(args, shortopts, longopts = []):
103101 If the first character of the option string is '+', or if the
104102 environment variable POSIXLY_CORRECT is set, then option
105103 processing stops as soon as a non-option argument is encountered.
106-
107104 """
108105
109106 opts = []
0 commit comments