pyo3/tests/ui/invalid_pymethod_proto_args.rs
Aviram Hassan 50659b6b02
__ipow__ now supports modulo argument on Python 3.8+.
`pyo3-macros-backend` is now compiled with PyO3 cfgs to enable different magic method definitions based on version.
Add check for correct number of arguments on magic methods.
2022-01-03 09:53:56 +02:00

14 lines
162 B
Rust

use pyo3::prelude::*;
#[pyclass]
struct MyClass {}
#[pymethods]
impl MyClass {
fn __truediv__(&self) -> PyResult<()> {
Ok(())
}
}
fn main() {}