A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-March/021907.html below:

[Python-Dev] Re: PEP 279

[Python-Dev] Re: PEP 279 [Python-Dev] Re: PEP 279Paul Svensson paul-python@svensson.org
Fri, 29 Mar 2002 07:32:52 -0500 (EST)
On Fri, 29 Mar 2002, Just van Rossum wrote:

>But the *reason* for this proposal is to turn this idiom:
>
>  for i in range(len(seq)):
>      element = seq[i]
>      ...
>
>into this:
>
>  for i, element in enumerate(seq):
>      ...
>
>It's hardly useful for types that don't have numeric indices, so the fact that
>it _does_ work with any iterator seems almost an implementation detail.
>
>I quite like the name enumerate. Hate itercount. I'm neutral on indexed.

Pardon me if I'm daft, but...
What was wrong with seq.items() / seq.iteritems(),
that they dropped out of the discussion ?

	/Paul





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