File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -980,8 +980,6 @@ impl<'py> PyAnyMethods<'py> for Bound<'py, PyAny> {
980980 where
981981 N : IntoPyObject < ' py , Target = PyString > ,
982982 {
983- // PyObject_HasAttr suppresses all exceptions, which was the behaviour of `hasattr` in Python 2.
984- // Use an implementation which suppresses only AttributeError, which is consistent with `hasattr` in Python 3.
985983 let result = unsafe {
986984 ffi:: compat:: PyObject_HasAttrWithError (
987985 self . as_ptr ( ) ,
@@ -1027,10 +1025,7 @@ impl<'py> PyAnyMethods<'py> for Bound<'py, PyAny> {
10271025 match unsafe {
10281026 ffi:: compat:: PyObject_GetOptionalAttr (
10291027 self . as_ptr ( ) ,
1030- attr_name
1031- . into_pyobject ( py)
1032- . map_err ( Into :: into) ?
1033- . as_ptr ( ) ,
1028+ attr_name. into_pyobject ( py) . map_err ( Into :: into) ?. as_ptr ( ) ,
10341029 & mut resp_ptr,
10351030 )
10361031 } {
You can’t perform that action at this time.
0 commit comments