[Edu-sig] digits of pi

Daniel Ajoy da.ajoy at gmail.com
Sat Jul 29 17:56:23 CEST 2006


On 29 Jul 2006 at 12:00, edu-sig-request at python.org wrote:

> From: John Zelle <john.zelle at wartburg.edu>
> Subject: Re: [Edu-sig] digits of pi
> 
> Here's a generator I coded up based on a paper by Gibbons:
>    http://web.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/spigot.pdf
> 
> It's simple to code, but I think you have to read the paper to figure out what 
> it's doing. (I just translated some code, so I really can't tell you :-) In 
> the paper, this was done in a lazy functional language. I was mostly 
> interested to see how it would translate to a Python generator.

Are both things: Python generators and lazy evaluation, two 
different tools that solve the same domain of problems?

Daniel



More information about the Edu-sig mailing list