pygame question

Michael Bauers me at michaelbauers.com
Thu Jul 11 18:58:18 EDT 2002


I was curious as to why 'is K_SPACE' worked, but 'is K_r' did not.  I had to
change the test for 'r' to ==.

* code snippet *
            elif (event.type is KEYDOWN and event.key is
               K_SPACE):
                # DO SOMETHING
            elif (event.type is KEYDOWN and
                  event.key == K_r):
               # DO SOMETHING ELSE






More information about the Python-list mailing list