You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
${dict} = Create Dictionary key=initial
${dict}[key] = Set Variable new
${list} = Create List one two
${list}[0] = Set Variable new
Especially setting dictionary items would be useful, but there certainly are cases where setting list items is convenient as well. In fact, this syntax should work with any object that has __setitem__.
Things to take into account:
It should be possible to specify the key/index as a variable like ${x}[${y}].
It should be possible to give list indices as strings and as integers.
Lists should support slices.
Error message should be clear if the item is immutable (tuple, string, immutable mapping, ...).
This would be a convenient feature, but because it's possible to manipulate lists and dicts with Collections keywords I don't consider this high priority. See also #4545 that proposes supporting ${x${y}} = Keyword and also contained this enhancement in it initially.
The text was updated successfully, but these errors were encountered:
pekkaklarck
changed the title
Support item assigment with lists and dicts like ${x}[key] = Keyword
Support item assignment with lists and dicts like ${x}[key] = KeywordJun 5, 2023
These aren't currently supported:
Especially setting dictionary items would be useful, but there certainly are cases where setting list items is convenient as well. In fact, this syntax should work with any object that has
__setitem__
.Things to take into account:
${x}[${y}]
.This would be a convenient feature, but because it's possible to manipulate lists and dicts with Collections keywords I don't consider this high priority. See also #4545 that proposes supporting
${x${y}} = Keyword
and also contained this enhancement in it initially.The text was updated successfully, but these errors were encountered: