Oops. The messed-up version wasn't supposed to be messed-up. Two
mistakes on one line. Which kinda proves my point :)

I'd much rather use the count version than (1) or (2). (1) has the
problem of having "incorrect" values the rest of the time in the loop
and (2) is going to an extreme just to avoid an import of count.

Your zipwithcount doesn't look as obvious as
  for n, a, b in zip(count(), A, B)
but is still easier to read than
  for n, (a, b) in enumerate(zip(A, B))

-Janto

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

Reply via email to