Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a395ced4
Commit
a395ced4
authored
Feb 25, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gerrit Holl's patch to move attribution from the docstring to a
comment. <gerrit@nl.linux.org>
parent
23417946
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/getopt.py
Lib/getopt.py
+4
-4
No files found.
Lib/getopt.py
View file @
a395ced4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment