On 03/14/2013 06:38 PM, Matthew Ngaha wrote:
i cant seem to break out of this loop. let me explain the variables you see:

          <SNIP>


             if Enemy.ships:
                 for missile in self.missiles:
                       flag = False
                     for rect in Enemy.rects:
                           assert(!flag)
                         if QPoint(missile.x + 5, missile.y) in rect:
                             explosion = Explosion(rect.x(), rect.y())
                             self.explosions.append(explosion)
                               flag = True
                             break

     (untested)

With that added code, if the break ever fails, it will raise an exception that you can then figure out.

At that point, you can figure out why your Python executable got corrupted.

more likely, you'll find that some other loop is similar enough that you got this one confused with that one.

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

Reply via email to