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

pass_module interacts badly with pyfunction arguments #1566

Closed
davidhewitt opened this issue Apr 18, 2021 · 0 comments · Fixed by #1567
Closed

pass_module interacts badly with pyfunction arguments #1566

davidhewitt opened this issue Apr 18, 2021 · 0 comments · Fixed by #1567
Labels

Comments

@davidhewitt
Copy link
Member

At the moment pass_module can interact in confusing ways with pyfunction arguments - it can go in any position, which is a bit confusing:

#[pyfunction(a, b, args = "*", pass_module, d = "5")]
fn test_function(m: &PyModule, a: i32, b: i32, args: &PyTuple, d: i32) {
    println!("{}, {}, {:?}, {}", a, b, args, d)
}

... I'm working on a PR which will change the situation such that pass_module must go first, if present.

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

Successfully merging a pull request may close this issue.

1 participant