summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-02-25 16:14:08 (GMT)
committerFred Drake <fdrake@acm.org>2000-02-25 16:14:08 (GMT)
commita395ced424e1cba3fc818fd729f273c3709ac62c (patch)
tree371fb065979512bc7cf97e17c8b136235b8effba /Lib
parent2341794667e5420782fb92a2d3258ade862265eb (diff)
downloadcpython-a395ced424e1cba3fc818fd729f273c3709ac62c.zip
cpython-a395ced424e1cba3fc818fd729f273c3709ac62c.tar.gz
cpython-a395ced424e1cba3fc818fd729f273c3709ac62c.tar.bz2
Gerrit Holl's patch to move attribution from the docstring to a
comment. <gerrit@nl.linux.org>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/getopt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/getopt.py b/Lib/getopt.py
index 692b8b9..761fc4f 100644
--- a/Lib/getopt.py
+++ b/Lib/getopt.py
@@ -7,9 +7,6 @@ and `--'). Long options similar to those supported by GNU software
may be used as well via an optional third argument. This module
provides a single function and an exception:
-Gerrit Holl <gerrit@nl.linux.org> moved the string-based exceptions
-to class-based exceptions.
-
getopt() -- Parse command line options
GetoptError -- exception (class) raised with 'opt' attribute, which is the
option involved with the exception.
@@ -17,6 +14,9 @@ option involved with the exception.
# Long option support added by Lars Wirzenius <liw@iki.fi>.
+# Gerrit Holl <gerrit@nl.linux.org> moved the string-based exceptions
+# to class-based exceptions.
+
import string
class GetoptError(Exception):
@@ -81,7 +81,7 @@ def getopt(args, shortopts, longopts = []):
def do_longs(opts, opt, longopts, args):
try:
- i = string.index(opt, '=')
+ i = opt.index('=')
opt, optarg = opt[:i], opt[i+1:]
except ValueError:
optarg = None