#[doc(hidden)] pub fn extract_optional_argument<'a, 'py, T>(
obj: Option<&'a Bound<'py, PyAny>>,
holder: &'a mut T::Holder,
arg_name: &str,
default: fn() -> Option<T>,
) -> PyResult<Option<T>>where
T: PyFunctionArgument<'a, 'py>,
Expand description
Alternative to extract_argument
used for Option<T>
arguments. This is necessary because Option<&T>
does not implement PyFunctionArgument
for T: PyClass
.