Steven Bethard <steven.beth...@gmail.com> added the comment: The equivalent to optparse callback is basically to define __call__ in a subclass of Action. Pretty much the same amount of work because they both have complicated parameters.
The "callable" I (not fully confidently) proposed would just be a shorthand for defining __call__ in a subclass of Action when you don't care about any of the other command line info. I guess, without further use cases for "callable" and given that you can subclass Action for other use cases, let's just do the action='write' version. Feel free to supply a patch, or I will when I get some time for argparse again. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9399> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com