只是关于python和pygame事件处理的noob问题.
我在pygame教程中得到以下代码:
while 1:
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
sys.exit()
Run Code Online (Sandbox Code Playgroud)
...但由于某种原因,它会返回此错误:
if event.type in (QUIT, KEYDOWN):
NameError: name 'QUIT' is not defined
Run Code Online (Sandbox Code Playgroud)
有谁能解释一下?