pyo3
pyo3 copied to clipboard
Destructure arguments in function signatures
I would like to destructure compound types in function signatures:
type CompoundType = (u64, u64);
#[pyfunction]
pub fn function((arg1, arg2): CompoundType) {}
But this is currently not supported:
error: destructuring in arguments is not supported
--> src/lib.rs:39:17
|
39 | pub fn function((arg1, arg2): CompoundType) {}
| ^^^^^^^^^^^^