Skip to content

Commit 90c7d67

Browse files
Remove comment
1 parent e2686d4 commit 90c7d67

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/types/any.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff 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
} {

0 commit comments

Comments
 (0)