On Sat, 15 Aug 2009 04:39:03 am Jason R. Coombs wrote: > I'd like to express additional interest in python patch 1660179, > discussed here: > > http://mail.python.org/pipermail/patches/2007-February/021687.html [...] > But to me, a compose function is much easier to read and much more > consistent with the decorator usage syntax itself. > > def meta_decorator(data): > return compose(dec_register_function_for_x, dec_alter_docstring, > dec_inject_some_data(data))
Surely that's better written as: meta_decorator = compose(dec_register_function_for_x, dec_alter_docstring, dec_inject_some_data) > I admit, I may be a bit biased; my first formal programming course > was taught in Scheme. Mine wasn't -- I've never even used Scheme, or Lisp, or any other functional language. But I've come to appreciate Python's functional tools, and would like to give a +0.5 to compose(). +1 if anyone can come up with additional use-cases. -- Steven D'Aprano _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com