I put win.close() in an else clause for two reasons: 1. I like the while loop else clause feature of Python, and it feels more semantically right to me in this situation.
2. I can't think of a good reason for using a break inside the Pyglet run loop. The run loop pumps window messages and updates the window display. The run loop's primary responsibility is managing the window containing your game/app. It is not really intended for controlling your game logic (that should have a loop of its own). When the top level Pyglet run loop is over, that should mean that the window has been closed (user "clicked the X" or pressed Esc or whatever other trigger). Closing the window will make has_exit true, and then the control flow passes to the nicely placed and semantically clean else clause. That's my reasoning for the else clause. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
