James Reynolds, 19.03.2010 21:17:
Here's another idea I had. I thought this would be slower than then the
previous algorithm because it has another for loop and another while loop. I
read that the overhead of such loops is high, so I have been trying to avoid
using them where possible.

Premature optimisation is the source of all evil.


     def mcrange_gen(self, sample):
         nx2 = self.nx1
         for q in sample:
             for a in nx2:
                 while a>  q:
                      pass

Looks like an infinite loop to me.

Stefan

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to