Skip to content

Commit

Permalink
gh-89682: [doc] reword docstring of __contains__ to clarify that it r…
Browse files Browse the repository at this point in the history
…eturns a bool (GH-29043)
  • Loading branch information
ivanistheone committed Nov 26, 2022
1 parent 7f00574 commit 25bc115
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
@@ -0,0 +1 @@
Reworded docstring of the default ``__contains__`` to clarify that it returns a :class:`bool`.
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Expand Up @@ -8741,7 +8741,7 @@ static pytype_slotdef slotdefs[] = {
SQSLOT(__delitem__, sq_ass_item, slot_sq_ass_item, wrap_sq_delitem,
"__delitem__($self, key, /)\n--\n\nDelete self[key]."),
SQSLOT(__contains__, sq_contains, slot_sq_contains, wrap_objobjproc,
"__contains__($self, key, /)\n--\n\nReturn key in self."),
"__contains__($self, key, /)\n--\n\nReturn bool(key in self)."),
SQSLOT(__iadd__, sq_inplace_concat, NULL,
wrap_binaryfunc,
"__iadd__($self, value, /)\n--\n\nImplement self+=value."),
Expand Down

0 comments on commit 25bc115

Please sign in to comment.