Python.io icon indicating copy to clipboard operation
Python.io copied to clipboard

TypeError: 'type' object is not subscriptable

Open gmolledaj opened this issue 2 years ago • 1 comments

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

gmolledaj avatar Jul 03 '22 15:07 gmolledaj

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] = {}

gmolledaj avatar Jul 03 '22 15:07 gmolledaj