-
Notifications
You must be signed in to change notification settings - Fork 951
Closed as not planned
Labels
Description
There are so many methods in this trait. Is there a reason why we don't just have
unsafe fn from_owned_ptr(py: Python<'p>, ptr: *mut ffi::PyObject) -> PyResult<&'p Self>;
unsafe fn from_borrowed_ptr(py: Python<'p>, ptr: *mut ffi::PyObject) -> PyResult<&'p Self>;
As the only trait method. And then just let users choose if they want to .ok(), .unwrap(), or .expect() this, instead of all the _or_opt, _or_panic etc.
Originally posted by @davidhewitt in #770
Reactions are currently unavailable