"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! Alan G _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
