Hi DISPLAYSURF = pygame.display.set_mode((400, 300)) pygame.display.set_caption('Hello World!')
The first line opens a 400x300 pygame window. The second one writes "Hello World" on top of it. I am just wondering how function set_caption finds the windows since the window's name DISPLAYSURF is not passed as an argument It would have understood something like: DISPLAYSURF.set_caption('Hello World!') or pygame.display.set_caption(DISPLAYSURF, 'Hello World!') thx -- https://mail.python.org/mailman/listinfo/python-list