fubark / cyber

Fast and concurrent scripting.
https://cyberscript.dev
MIT License
1.18k stars 40 forks source link

Unexpected List Behavior #4

Closed zachcp closed 1 year ago

zachcp commented 1 year ago

Seems like the remove operator has an issue....

all_data = [1,2,3,4]

print all_data

for all_data as d:
    print d

print("Remove an item ... ")

all_data.remove(1)

for all_data as d:
    print d
List (4)
1
2
3
4
Remove an item ... 
1
2
2
fubark commented 1 year ago

This is fixed. It also does an index check and returns error(#OutOfBounds), but this might change in the future since it's inconsistent with index access out of bounds which is a panic.