Pygame functions having two brackets

Tags: , ,



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?

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



Source: stackoverflow