Calls a function in the module. This is equivalent to the Python expression: `getattr(module, name)(*args, **kwargs)` `args` should be a value that, when converted to Python, results in a tuple. For this purpose, you can use: `cpython::NoArgs` when calling a method without any arguments otherwise, a Rust tuple with 1 or more elements # Example ``` use cpython::NoArgs; # use cpython::Python; # le
(
&self,
py: Python,
name: &str,
args: A,
kwargs: Option<&PyDict>,
)
| 124 | /// sys.call(py, "setrecursionlimit", (1000,), None).unwrap(); |
| 125 | /// ``` |
| 126 | pub fn call<A>( |
| 127 | &self, |
| 128 | py: Python, |
| 129 | name: &str, |
| 130 | args: A, |
| 131 | kwargs: Option<&PyDict>, |
| 132 | ) -> PyResult<PyObject> |
| 133 | where |
| 134 | A: ToPyObject<ObjectType = PyTuple>, |
| 135 | { |
| 136 | self.as_object().getattr(py, name)?.call(py, args, kwargs) |
| 137 | } |
| 138 | |
| 139 | /// Adds a member to the module. |
| 140 | /// |