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
576298d3
Commit
576298d3
authored
Aug 02, 2004
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fix description of option table entries
- fix broken assert statement; should just raise
parent
c75f1122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/distutils/fancy_getopt.py
Lib/distutils/fancy_getopt.py
+4
-3
No files found.
Lib/distutils/fancy_getopt.py
View file @
576298d3
...
...
@@ -45,8 +45,9 @@ class FancyGetopt:
def
__init__
(
self
,
option_table
=
None
):
# The option table is (currently) a list of 3-tuples:
# (long_option, short_option, help_string)
# The option table is (currently) a list of tuples. The
# tuples may have 3 or four values:
# (long_option, short_option, help_string [, repeatable])
# if an option takes an argument, its long_option should have '='
# appended; short_option should just be a single character, no ':'
# in any case. If a long_option doesn't have a corresponding
...
...
@@ -162,7 +163,7 @@ class FancyGetopt:
else
:
# the option table is part of the code, so simply
# assert that it is correct
assert
"invalid option tuple: %r"
%
(
option
,)
raise
ValueError
,
"invalid option tuple: %r"
%
(
option
,)
# Type- and value-check the option names
if
type
(
long
)
is
not
StringType
or
len
(
long
)
<
2
:
...
...
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