summaryrefslogtreecommitdiffstats
path: root/Doc/library/optparse.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/optparse.rst')
-rw-r--r--Doc/library/optparse.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 4e9bb23..2cf8042 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1506,7 +1506,7 @@ Here's an example of a callback option that takes no arguments, and simply
records that the option was seen::
def record_foo_seen(option, opt_str, value, parser):
- parser.saw_foo = True
+ parser.values.saw_foo = True
parser.add_option("--foo", action="callback", callback=record_foo_seen)
@@ -1646,7 +1646,7 @@ arguments::
value.append(arg)
del parser.rargs[:len(value)]
- setattr(parser.values, option.dest, value))
+ setattr(parser.values, option.dest, value)
[...]
parser.add_option("-c", "--callback", dest="vararg_attr",