Describe the bug
In the Screeps Python (Transcrypt) environment, increment assignment on a dictionary value does not work as expected.
To Reproduce
Example code:
cs_dict = {"a": 0}
console.log("a: ", cs_dict["a"])
cs_dict["a"] += 1
console.log("a: ", cs_dict["a"])
cs_dict["a"] = 1
console.log("a: ", cs_dict["a"])
Actual behavior
The output is:
Expected behavior
The expected output should be:
Additional context
This issue makes it impossible to use dict[key] += 1 for counting in Screeps Python.
Please help to check if this is a Transcrypt compatibility bug or a Screeps Python integration issue.
Thank you!