Refer to http://www.pygame.org/docs/ref/display.html#pygame.display.set_caption:
set_caption(title, icontitle=None) -> None
If the display has a window title, this function will change the name
on the window. Some systems support an alternate shorter title to be
used for minimized displays.
Your usage was correct, so there must be another issue. Either your window is initialized incorrectly, or it isn't even initialized at all. Contributing your code would be helpful.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…