On Wed, Dec 21, 2011 at 1:41 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
>
> I expected the equivalent of:
>
> remainder = [n % d for (n, d) in zip(numerator, denominator)]
>
> which is what numpy does.

I do want to come up with a nice way to do that... However:

if numerator and denominator are plain lists that magically have an
each method...

each_numerator = numerator.each
each_denominator = denominator.each

each_numerator % each_denominator

see where I'm going with the mismatch on the semantics?  I know the
example is a bit contrived, sorry.

Expanding iterators by default might be a worth a shot though, since
passing around iterators like that is pretty rare.

Nathan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to