On Wed, Dec 21, 2011 at 11:24 AM, Joshua Landau
<joshua.landau...@gmail.com> wrote:
> I was under the impression that these were meant to be interchangeable. This
> is because functions are just wrappers to non-functions, really.
>
>>>> from elementwise import ElementwiseProxy as P
>>>> (lambda x:x+[1])(P([[0],[0],[0]]))
> [0, 1], [0, 1], [0, 1]
>
> If we have to use .apply, we might as well use map :P.

Agreed.  The advantage of .apply here is that when the functions are
nested they are written left-to-right.  But I wouldn't be using
multiple maps or applys on a single line anyway -- my goal is to write
clear code, not great one-liners. :-D
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to