Skip to content
Advertisement

Pygame functions having two brackets

Why does pygame.dispay.set_mode(()) and other similar functions has two braces instead of one and why it isnt working if i just put only one brace?

Advertisement

Answer

The display mode gets a tuple with two items to describe the resolution for the render-screen. And a tuple will be defined by

pygame.dispay.set_mode(size=(640, 280))

When using the default you just use the empty tuple definition

pygame.dispay.set_mode(size=(0, 0))

I have found this here PyGame Documentation

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement