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/2000-August/008160.html below:

[Python-Dev] Lockstep iteration - eureka!

[Python-Dev] Lockstep iteration - eureka! [Python-Dev] Lockstep iteration - eureka!Paul Prescod paul@prescod.net
Fri, 11 Aug 2000 08:19:05 -0500
Just van Rossum wrote:
> 
> ...
>
>        for <index> indexing <element> in <seq>:
>            ...

 
Let me throw out another idea. What if sequences just had .items()
methods?

j=range(0,10)

for index, element in j.items():
    ...

While we wait for the sequence "base class" we could provide helper
functions that makes the implementation of both eager and lazy versions
easier.

-- 
 Paul Prescod - Not encumbered by corporate consensus
"I don't want you to describe to me -- not ever -- what you were doing
to that poor boy to make him sound like that; but if you ever do it
again, please cover his mouth with your hand," Grandmother said.
	-- John Irving, "A Prayer for Owen Meany"



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