On Sat, Dec 17, 2011 at 5:38 AM, Arnaud Delobelle <arno...@gmail.com> wrote: > On 16 December 2011 18:25, Chris Angelico <ros...@gmail.com> wrote: > >> tee = lambda func,arg: (func(arg),arg)[1] > > What a strange way to spell it! > > def tee(func, arg): > func(arg) > return arg
I started with that version and moved to the lambda for compactness. But either way works. It's no more strange than the way some people omit the u from colour. :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list