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
Describe the bug
Currently it's not possible to remove string values from a list, as the string values are interpreted as keys vs values.
To Reproduce
set myList to ["one","two"]
myList -= ["one"]
print myList
Expected behavior
"one" value is removed from the list. Today it does nothing, as it looks for a "one" key, doesn't find it, and then returns the original llist.
Additional context
I think a major issue here is an inability to declare whether you are trying to operate on keys or on values. Additionally, it may be time to consider separating lists and dictionaries more strongly.
The text was updated successfully, but these errors were encountered:
I think i like the idea of {} for dictionaries and [] for lists. This would be similar to python, though I think I like "->" as the key separator vs ":", which is already overloaded.
Sounds good and would remove atleast one of my problems when replacing the ListProcessor with a conventional rule.
One stumbling block might be the MultiListProcessor when someone wants to immediatly access a dict.
I did start to implement a seperation of KeyedList into a dictionary and a list. While doing that i noticed that the actual expected/implemented behaviour is removal by index/key.
Print reverse (0...3) - 1
# [3,1,0]
To make the example given in the issue report work would necessitate a change of the current behaviour.
Describe the bug
Currently it's not possible to remove string values from a list, as the string values are interpreted as keys vs values.
To Reproduce
set myList to ["one","two"]
myList -= ["one"]
print myList
Expected behavior
"one" value is removed from the list. Today it does nothing, as it looks for a "one" key, doesn't find it, and then returns the original llist.
Additional context
I think a major issue here is an inability to declare whether you are trying to operate on keys or on values. Additionally, it may be time to consider separating lists and dictionaries more strongly.
The text was updated successfully, but these errors were encountered: