A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026776.html below:

[Python-Dev] Single- vs. Multi-pass iterability

[Python-Dev] Single- vs. Multi-pass iterability [Python-Dev] Single- vs. Multi-pass iterabilityFredrik Lundh fredrik@pythonware.com
Fri, 19 Jul 2002 16:42:34 +0200
aahz wrote:

> > I believe this is where the biggest debate lies: whether "for" =
should be
> > non-destructive.  I realize we are currently on the other side of =
the
> > fence, but i foresee enough potential pain that i would like you to
> > consider the value of keeping "for" loops non-destructive.
>
> Consider
>=20
>     for line in f.readlines():
>=20
> in any version of Python.

and?  for-in doesn't modify the object returned
by f.readlines(), and never has.

</F>





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4