summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-05 11:33:21 (GMT)
committerGeorg Brandl <georg@python.org>2009-02-05 11:33:21 (GMT)
commit253a29fa4dbcfd51627565437235ddb625513da6 (patch)
tree450f8054e27a8941c9344dd6aa35626a19c6f9d5 /Doc
parent4400d84bf7b424261d618840d38787225033332c (diff)
downloadcpython-253a29fa4dbcfd51627565437235ddb625513da6.zip
cpython-253a29fa4dbcfd51627565437235ddb625513da6.tar.gz
cpython-253a29fa4dbcfd51627565437235ddb625513da6.tar.bz2
#4827: fix callback example.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/optparse.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 604ac7f..4ef2ba7 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -1511,7 +1511,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)