[portland] Two Indices, One For Loop?
Rich Shepard
rshepard at appl-ecosys.com
Tue Apr 22 02:02:00 CEST 2008
On Mon, 21 Apr 2008, Matt McCredie wrote:
> It doesn't use indecies so it would work even if you were using say
> generator instead of lists or tuples. It is probably a _tiny_ bit faster
> too, but I'm sure that isn't a concern. In general, I avoid indecies if I
> can. Rarely should you need to call range(len(seq)), or anything similar
> in python.
Matt,
Thank you for the lesson.
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the Portland
mailing list