v0.3.0
·
1264 commits
to main
since this release
Our JS Proxies now implement all Array and Object methods on Python Lists and Dicts, and our Python List and Dict subtypes implements operators and methods on JS Arrays and Objects.
One can now do
items = [1, 2, 3, 4, 5]
result = [None]
pm.eval("(result, arr) => {result[0] = arr.some((element) => element % 2 === 0)}")(result, items)
-> result[0] == Trueand going the other way
a = pm.eval("([1,2,3,4,5,6])")
b = a[1:5]
-> b == [2,3,4,5] We also have all the iterators returned by such methods as values() now working without making copies of the object being iterated upon