From 253a29fa4dbcfd51627565437235ddb625513da6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 5 Feb 2009 11:33:21 +0000 Subject: [PATCH] #4827: fix callback example. --- Doc/library/optparse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index 604ac7f859..4ef2ba7eb8 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) -- 2.50.1