Python.io
Python.io copied to clipboard
TypeError: 'type' object is not subscriptable
File "/home/.../python/pygame/Python.io-main/game/snake.py", line 7, in Snake def init(self, position: vec2, color: tuple[int, int, int]): TypeError: 'type' object is not subscriptable
The error is removed by removing the word tuple. File snake.py class Snake: def init(self, position: vec2, color: [int, int, int]):#tuple[int, int, int]):
Same error file server.py with word dict #snakes: dict[str, Snake] = {} snakes: [str, Snake] = {} #clients: dict[str, socket.socket] = {} clients: [str, socket.socket] = {}