pub fn from_owned_ptr_or_opt(py: Python, ptr: *mut ffi::PyObject) -> Option<PyObject>
    {
        if ptr.is_null() {
            None
        } else {
            Some(unsafe{
                PyObject::from_owned_ptr(py, ptr)
            })
        }
    }
/// Construct `PyObject` from the result of a Python FFI call that
/// returns a new reference (owned pointer).
/// Returns `None` if the pointer is `null`.
Construct `PyObject` from the result of a Python FFI call that
returns a new reference (owned pointer).
Returns `None` if the pointer is `null`.
Construct ` PyObject ` from the result of a Python FFI call that returns a new reference ( owned pointer ) . Returns ` None ` if the pointer is ` null ` .
pub fn from_owned_ptr_or_opt(py: Python, ptr: *mut ffi::PyObject) -> Option<PyObject>
    {
        if ptr.is_null() {
            None
        } else {
            Some(unsafe{
                PyObject::from_owned_ptr(py, ptr)
            })
        }
    }
pub fn from_owned_ptr_or_opt ( py : Python , ptr : * mut ffi :: PyObject ) -> Option < PyObject > { if ptr . is_null ( ) { None } else { Some ( unsafe { PyObject :: from_owned_ptr ( py , ptr ) } ) } }
Construct `PyObject` from the result of a Python FFI call that
returns a new reference (owned pointer).
Construct ` PyObject ` from the result of a Python FFI call that returns a new reference ( owned pointer ) .
py
Python
ptr
*mut ffi::PyObject
py
Python
ptr
*mut ffi::PyObject