Consider these lines in the pygame loop:
ev = pygame.event.poll()
ev.type == pygame.QUIT
From: http://openbookproject.net/thinkcs/python/english3e/pygame.html
From what I understand the function pygame.event.poll()
creates an instance of the Event class in the event module of the pygame package.
I. Now ev.type
is an attribute call(?) but how do I know which values it can have? How can you even tell from the pygame documentation that it has the possibility to equal pygame.QUIT?
II. What exactly is pygame.QUIT? How does it get a value?
III. help('pygame.QUIT')
says pygame.QUIT = class int(object)
. How do you call this construction?