Kaydet (Commit) 253a29fa authored tarafından Georg Brandl's avatar Georg Brandl

#4827: fix callback example.

üst 4400d84b
...@@ -1511,7 +1511,7 @@ Here's an example of a callback option that takes no arguments, and simply ...@@ -1511,7 +1511,7 @@ Here's an example of a callback option that takes no arguments, and simply
records that the option was seen:: records that the option was seen::
def record_foo_seen(option, opt_str, value, parser): 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) parser.add_option("--foo", action="callback", callback=record_foo_seen)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment