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
We can't use a list comprehension here because changes it is not a true Python list, it's a QuickJS array which doesn't support that. We also don't have the ability to convert these JavaScript objects to Python with a one shot utility because certain reflection data is missing per Andreas.
But what we could do is make simple wrapping utilities that will convert one level of the tree:
JavaScript array to Python list (just does a iteration like this without looking at the objects in the array)
JavaScript dictionary to Python dictionary (you would have to pass exactly the keys you expect)
With this approach, we can contain the weirdness of the JavaScript objects to where we get them, requiring a couple of utility calls, and use proper Python code thereafter.
We can't use a list comprehension here because
changes
it is not a true Python list, it's a QuickJS array which doesn't support that. We also don't have the ability to convert these JavaScript objects to Python with a one shot utility because certain reflection data is missing per Andreas.But what we could do is make simple wrapping utilities that will convert one level of the tree:
With this approach, we can contain the weirdness of the JavaScript objects to where we get them, requiring a couple of utility calls, and use proper Python code thereafter.
Originally posted by @phillco in #2709 (comment)
The text was updated successfully, but these errors were encountered: