Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 23 additions & 1 deletion Objects/clinic/setobject.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,28 @@ set___contains___impl(PySetObject *so, PyObject *key)
return PyBool_FromLong(result);
}

/*[clinic input]
@coexist
frozenset.__contains__
so: setobject
object as key: object
/

x.__contains__(y) <==> y in x.
[clinic start generated code]*/

static PyObject *
frozenset___contains___impl(PySetObject *so, PyObject *key)
/*[clinic end generated code: output=2301ed91bc3a6dd5 input=2f04922a98d8bab7]*/
{
long result;

result = set_contains_lock_held(so, key);
if (result < 0)
return NULL;
return PyBool_FromLong(result);
}

/*[clinic input]
@critical_section
set.remove
Expand Down Expand Up @@ -2555,7 +2577,7 @@ PyTypeObject PySet_Type = {


static PyMethodDef frozenset_methods[] = {
SET___CONTAINS___METHODDEF
FROZENSET___CONTAINS___METHODDEF
FROZENSET_COPY_METHODDEF
SET_DIFFERENCE_MULTI_METHODDEF
SET_INTERSECTION_MULTI_METHODDEF
Expand Down
Loading