Python 'for' loop is memory inefficient

John Machin sjmachin at
Mon Aug 17 03:23:23 CEST 2009

On Aug 17, 8:35 am, sturlamolden <sturlamol... at> wrote:

> A compiler could easily recognise a statement like
>    for i in range(n):
> as a simple integer loop. In fact, Cython is able to do this.

Extremely easy, once users relinquish the right to replace built-in
"range" with their own concoctions ...

More information about the Python-list mailing list