for loop without variable

Fredrik Lundh fredrik at pythonware.com
Fri Jan 11 07:24:29 EST 2008


Paul Rubin wrote:

> it just seems way too obscure though.  Python style seems to favor
> spewing extra variables around.

that's because (local) variables have near-zero cost, and zero overhead. 
  use as many as you want, and reuse them as often as you want to.

(and if you use sane naming conventions, the risk for collisions is near 
zero as well).

</F>




More information about the Python-list mailing list