- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Closed
Labels
Milestone
Description
In the first line of the following code, implicitly I create a dictionary with a key (subKey1) inside that is of type dict. In the second line I overwrite this key with an integer value:
${testdict1.subKey1.subKey2} : 1,
${testdict1.subKey1} : 3
Outcome:
Error: 'Could not set variable 'testdict1['subKey1']['subKey2']' with value '1'! Reason: 'int' object does not support item assignment'!
It is astonishing that the error message indicates an error in the first line - because the first line (as stand-alone) works.
Why is it not possible to overwrite the value of a key anywhere in the middle of the key hierarchy?
The expectation is:
{'testdict1': {'subKey1': 3}}
I cross checked with pure Python. This works:
testdict3 = {"A" : {"B" : {"C" : 1}}}
testdict3['A']['B'] = 2
Metadata
Metadata
Assignees
Labels
Projects
Status
Done