From: Georg Brandl Date: Thu, 5 Feb 2009 11:33:21 +0000 (+0000) Subject: #4827: fix callback example. X-Git-Tag: v2.7a1~2117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=253a29fa4dbcfd51627565437235ddb625513da6;p=thirdparty%2FPython%2Fcpython.git #4827: fix callback example. --- diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index 604ac7f85929..4ef2ba7eb840 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)