Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary check
  • Loading branch information
sizmailov committed May 22, 2022
commit fc16ab974fb5d0e564478ed845ac18843bc70758
4 changes: 1 addition & 3 deletions Objects/descrobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,9 +1812,7 @@ property_init_impl(propertyobject *self, PyObject *fget, PyObject *fset,
a non-None object with incremented ref counter */

if (Py_IS_TYPE(self, &PyProperty_Type)) {
if (prop_doc != NULL && prop_doc != Py_None) {
Py_XSETREF(self->prop_doc, prop_doc);
}
Py_XSETREF(self->prop_doc, prop_doc);
} else {
/* If this is a property subclass, put __doc__
in dict of the subclass instance instead,
Expand Down