Skip to content

Navigation Menu

Sign in
Sign up

feat(JSFunctionProxy): implement passing kwargs as a final argument - #506

Open
zollqir wants to merge 1 commit into
main from
caikens/fix-kwargs
Open

feat(JSFunctionProxy): implement passing kwargs as a final argument #506
zollqir wants to merge 1 commit into
main from
caikens/fix-kwargs

Conversation

@zollqir

@zollqir zollqir commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

This implements passing kwargs to JS functions, by appending the kwargs dict to the end of the arguments array, to have the same behaviour as pyodide.

So for example:

print(pm.eval("(function() {return [...arguments]})")(1, 2, i=42, j=43))
# [1, 2, {"i": 42, "j": 43}]

It also fixes a bug where passing kwargs to pm.new would result in an inscrutable error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /