On Fri, Jul 17, 2009 at 7:31 AM, Xavier Ho<cont...@xavierho.com> wrote: > I have a simple class that generates prime numbers, using memorisation and > iteration to generate the next prime number. > > In the class, I have defined a function that gives, say, the 5th prime > number. Or the 1000th, it's still very fast. But the code isn't what I > really like. [...] > My problem is that it's a "While True" loop, which I get a lot of "Don't do > it!" In the light of making the code better, what could I do?
Where do you get these "Don't do it!"s? As far as I know, "while true" loops are a very acceptable idiom for programming in Python (and several other languages). -- André Engels, andreeng...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list