Skip to content
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

Argument specification by function attribute can be ambiguous #794

Closed
kngwyu opened this issue Mar 6, 2020 · 1 comment
Closed

Argument specification by function attribute can be ambiguous #794

kngwyu opened this issue Mar 6, 2020 · 1 comment

Comments

@kngwyu
Copy link
Member

kngwyu commented Mar 6, 2020

For example, we can do

    #[args(a, "*", c = 3)]
    fn get&self, a: i32, b: i32, c: i32) -> PyResult<i32> { ... }

, where the position of separator is ambiguous.
And it's also problematic that here we can use unrelated idents like

    #[args(a, "*", d = 3)]
    fn get&self, a: i32, b: i32, c: i32) -> PyResult<i32> { ... }
@davidhewitt
Copy link
Member

Fixed by the new #[pyo3(signature = (...)] option which replaces #[args] and doesn't allow for ambiguity.

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

No branches or pull requests

2 participants