Closed Starbuck5 closed 2 years ago
Yes, I think I decided a while ago to keep this raise SystemExit
statement even if it was useless for "documentation purpose", but don't think it was a meaningful decision back now.
I'm more skeptical about the pygame.quit()
addition though, it was present before but I removed it because it seems to be unnecessary...
I checked it today again and according to docs it is implicitly call anyway:
https://www.pygame.org/docs/ref/pygame.html#pygame.quit "[...] When the Python interpreter shuts down, this method is called regardless, so your program should not need it, except when it wants to terminate its pygame resources and continue."
I also tested it, and I'm not able to see any difference between having this line or not.
Am I missing something @Starbuck5 ?
It’s specifically for IDLE @Grimmys
IDLE doesn’t shut down the python environment when a script ends.
Oooooh ok, sorry at first I thought by IDLE you mean the word: https://dictionary.cambridge.org/fr/dictionnaire/anglais/idle But yeah you will not have put in in caps if it was the case.
Thanks for your contribution then!
I added in a pygame.quit() so the window closes when the program execution ends on IDLE.
I also got rid of the
raise SystemExit
, because I don't believe it's needed, as the program execution stops right after it.