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
d1c797e6
Commit
d1c797e6
authored
Jun 11, 2006
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF #1366250: optparse docs: fix inconsistency in variable name; minor tweaks.
parent
19302d92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
Doc/lib/liboptparse.tex
Doc/lib/liboptparse.tex
+7
-7
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/lib/liboptparse.tex
View file @
d1c797e6
...
...
@@ -1197,16 +1197,16 @@ its \method{parse{\_}args()} method:
where the input parameters are
\begin
{
description
}
\item
[
\code
{
args
}
]
the list of arguments to process
(
\code
{
sys.argv
{
[
}
1
:
]
}
by default
)
the list of arguments to process
(
default:
\code
{
sys.argv
{
[
}
1
:
]
}
)
\item
[
\code
{
options
}
]
object to store option arguments in
(
a new instance of
optparse.Values
by default
)
object to store option arguments in
(
default:
a new instance of
optparse.Values
)
\end
{
description
}
and the return values are
\begin
{
description
}
\item
[
\code
{
options
}
]
the same object
as was passed in as
\code
{
options
}
, or the new
the same object
that was passed in as
\code
{
options
}
, or the
optparse.Values instance created by
\module
{
optparse
}
\item
[
\code
{
args
}
]
the leftover positional arguments after all options have been
...
...
@@ -1214,9 +1214,9 @@ processed
\end
{
description
}
The most common usage is to supply neither keyword argument. If you
supply
a
\code
{
values
}
object, it will be repeatedly modified with a
\code
{
setattr
()
}
call for every option argument written
to an option
destination
, and finally
returned by
\method
{
parse
{
\_
}
args
()
}
.
supply
\code
{
options
}
, it will be modified with repeated
\code
{
setattr
()
}
calls
(
roughly one for every option argument stored
to an option
destination
)
and
returned by
\method
{
parse
{
\_
}
args
()
}
.
If
\method
{
parse
{
\_
}
args
()
}
encounters any errors in the argument list, it calls
the OptionParser's
\method
{
error
()
}
method with an appropriate end
-
user error
...
...
Misc/NEWS
View file @
d1c797e6
...
...
@@ -145,6 +145,8 @@ Extension Modules
Library
-------
- Bug #1366250: minor optparse documentation error.
- Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately;
clarify docs.
...
...
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