writing this with pygame in python 3.2 keep getting error: built_in_function_or_method object is not subscriptable

writing this with pygame in python 3.2 keep getting error: built_in_function_or_method object is not subscriptable

def message_to_screen(msg,color):
    screen_text = font.render(msg, True, color)
    gameDisplay.blit(screen_text, [display_width/2, display_height/2])
    #other code is here but I dont think its relevent
message_to_screen("You Lose", red)
time.sleep[2]
pygame.display.update()
pygame.quit()       
quit()
#making a snake game in pygame          

您需要更改此处的方括号:

time.sleep[2]

括号内:

time.sleep(2)