I would like use something like that:

class Board():
    ...
    def __getitem__(self, y, x):
        return self.board[y][x]

but unfortunatelly, when I call:

board[x][y]

I get: TypeError: __getitem__() takes exactly 3 arguments (2 given)

Edit
Report