pub fn is_instance<T>(&self, py: Python) -> bool
    where
        T: PyTypeObject,
    {
        unsafe {
            ffi::PyErr_GivenExceptionMatches(self.ptype_ptr(py), T::type_object(py).as_ptr()) != 0
        }
    }
/// Returns true if the current exception is instance of `T`.
Returns true if the current exception is instance of `T`.
Returns true if the current exception is instance of ` T ` .
pub fn is_instance<T>(&self, py: Python) -> bool
    where
        T: PyTypeObject,
    {
        unsafe {
            ffi::PyErr_GivenExceptionMatches(self.ptype_ptr(py), T::type_object(py).as_ptr()) != 0
        }
    }
pub fn is_instance < T > ( & self , py : Python ) -> bool where T : PyTypeObject , { unsafe { ffi :: PyErr_GivenExceptionMatches ( self . ptype_ptr ( py ) , T :: type_object ( py ) . as_ptr ( ) ) != 0 } }
Returns true if the current exception is instance of `T`.
Returns true if the current exception is instance of ` T ` .
&self
py
Python