On Fri, Nov 18, 2011 at 1:18 PM, John Ladasky <lada...@my-deja.com> wrote: > def _pass(*args): > pass > > def long_running_process(arg1, arg2, arg_etc, report = _pass): >
For some compactness at the expense of brevity, you could use a lambda: def long_running_process(arg1, arg2, arg_etc, report = lambda msg: None): Other than that, I think it's fine. (Actually, the lambda has a slight advantage in self-documentation; in the main function's definition it specifies that the 'report' argument is a function that takes one argument, the message. (Or whatever that argument is. Name it appropriately.) If you call your dummy function something else, it may help readability/self-documentation too. On the other hand, it may not. YMMV. ChrisA -- http://mail.python.org/mailman/listinfo/python-list