We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.1.1.stable.official.bd6af8e0e
Windows 10.0.19045 - Vulkan (Compatibility) - GeForce GT 540M- Intel Core i7-2670QM CPU @ 2.20GHz (8 Threads)
When a dictionary is made with a mutable key, for example:
var x = [1, 2, 3] var test = {x: "cat"}
And then then the key is mutated:
x[2] = 4
Weird behaviour can be observed:
print(test) print(test[x]) print(test[[1,2,4]])
Returns:
{[1, 2, 4]: <null>} <null> <null>
Instead of:
{[1, 2, 4]: "cat"} "cat" "cat"
Even though:
print(test.find_key("cat"))
Works correctly:
[1, 2, 4]
For reference in Python:
test = {[1, 2, 3]: "cat"}
Is:
Traceback (most recent call last): File "test.py", line 1, in <module> test = {[1, 2, 3]: "cat"} TypeError: unhashable type: 'list'
Mutable-Dictionary-Key-4.1.1-Test.zip
The text was updated successfully, but these errors were encountered:
I can confirm the issue for version v4.2.dev3.official.013e8e3af.
Sorry, something went wrong.
No branches or pull requests
Godot version
v4.1.1.stable.official.bd6af8e0e
System information
Windows 10.0.19045 - Vulkan (Compatibility) - GeForce GT 540M- Intel Core i7-2670QM CPU @ 2.20GHz (8 Threads)
Issue description
When a dictionary is made with a mutable key, for example:
And then then the key is mutated:
Weird behaviour can be observed:
Returns:
Instead of:
Even though:
Works correctly:
For reference in Python:
Is:
Steps to reproduce
Minimal reproduction project
Mutable-Dictionary-Key-4.1.1-Test.zip
The text was updated successfully, but these errors were encountered: