-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Required ATL transform's keyword-only parameter can't be curryfied #4371
Comments
Unbound required keyword-only parameters are also forgotten when currying the transform : |
numerous improvements fixes #4371 keyword-only parameters are now actually supported in ATL
pos-only arguments (placed before a slash in the signature) are parsed and compiled correctly, but are treated as pos-or-keyword by the atl code and turned into that in the curryfied version. For |
Maybe this deserves a separate issue, because it has to do with transform h(a, child, b=5):
pass
|
Adresses most of the main points of #5102, and #4371. The parameters that get fixed are still forbidden though, as are var-pos and var-kw parameters. That will be for another PR. But the implementation that goes with handling those is already here, commented-out for performance. The solution to #4405 is there too but also commented out. That change will also go in separately.
al(b=5)
works, and returns a (sort-of) curryfied version of al (sort-of becauseal(b=5)(b=3)
works)al(d=6)
works and does (sort-of) the sameal(c=5)
fails, for no apparent reason.This is because the related section of atl.py was written when defaultless (=required) keyword-only arguments weren't a thing, and it wasn't updated
in 13 yearswhen Andy upgraded the parameters syntax to py3 standards.This should/will be fixed when upgrading the parameters system to using the inspect module.
Also, atl doesn't take *args or **kwargs (the parser checks against it), and I'm not sure why.
The text was updated successfully, but these errors were encountered: