-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
flx_args
is overwritten while parsing
#23
Comments
flx_args
variable is overwritten while parsingflx_args
is overwritten while parsing
I am sorry, but I am having trouble understanding the problem. I don't see how I tried to work with the example in your PR: from pscript import py2js, evaljs
def partial2(a1, a2, *args, **kwargs):
print(a1, a2)
print(args)
print(kwargs)
print('--')
def main():
partial2(3, 4, 5, 6, foo=3, bar=4)
js = py2js(partial2)
# print(js)
print(evaljs(js + py2js(main) + 'main(); partial2(3, 4, 5)')) Which produces this, which seems fine:
Could you please try to adjust this code for it to cause the error on your end? That would hopefully make things more explicit :) |
Wow! This is madness ... but I can confirm it on both Chrome and Firefox (Windows 10). It looks like JS is full of surprises :( |
pscript generates broken code for functions like
def partial2(func, *args, **keywords):
When trying to parse *args it overwrites arguments[0]:
The text was updated successfully, but these errors were encountered: