[Python-ideas] Aid reiteration with new class: gfic

Mathias Panzenböck grosser.meister.morti at gmx.net
Sat Jun 20 21:23:54 CEST 2009

Lie Ryan wrote:
 > Steven D'Aprano wrote:
 >> On Sat, 20 Jun 2009 01:55:42 pm John Graham wrote:
 >>> Hrm, that leads to the question, is it mathematically possible to
 >>> iterate over an infinite list... twice? :)
 >> Mathematically, yes. Practically, no.
 >> Mathematically, the trick is to ensure that the time it takes to iterate
 >> over each item approaches zero sufficiently fast. E.g. if it takes 1
 >> unit of time to process the first item, and 1/2 units of time for the
 >> second, and 1/4 for the third, 1/8 for the fourth, etc, then you can
 >> iterate over an infinite number of items in 2 units of time total. Then
 >> you can do them all again :)
 > It is also possible to do parallel iteration, but I'm not sure that
 > mathematically parallel processing makes sense. I'm not even sure that
 > mathematically there is such thing as iteration (that does not involve
 > recursion).

Well there is something called "process algebra" (at least I think its called 
that way, in german its: Prozess Algebra). This provides a (mathematical?) model 
for such things.

More information about the Python-ideas mailing list