3 ms·
Tuple entries must be hashable, which (as far as standard library is concerned) means immutable.
by vscode-rest 10mo ago
Tuple entries must be hashable, which (as far as standard library is concerned) means immutable.
- pansa2 10mo ago>>> hash([1, 2]) TypeError: unhashable type: 'list' >>> t = ([1, 2], [3, 4]) >>> print(t) ([1, 2], [3, 4])
- vscode-rest 10mo agoAh. Of course… that’s how the workaround to use tuples as frozen dicts can work in the first place. Slow morning for me!