At 02:50 PM 7/13/2007, Alan Gauld wrote: >"Dick Moores" <[EMAIL PROTECTED]> wrote in > > > > import itertools > > > > def iter_primes(): > > # an iterator of all numbers between 2 and +infinity > > numbers = itertools.count(2) > > ... > > > It works for me in Win XP, Python 2.5. > > > > However, in trying to dig into the code to understand it, > > I'm not able to find itertools.py, > >Thats because its a compiled C module not implemented >in Python. You probably won't find a sys.py either. > >If you do > > >>> print itertools ><module 'itertools' (built-in)> > >You'll see its actually built-in. > >So you need to look at the C source to see how it is written!
Ah. and >>> import math >>> print math <module 'math' (built-in)> Thanks, Alan! Dick _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor