Skip to content

Commit 68ecfe5

Browse files
committed
Fix the condition
1 parent 0932e16 commit 68ecfe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/setobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2781,7 +2781,7 @@ PySet_Add(PyObject *anyset, PyObject *key)
27812781
return rv;
27822782
}
27832783

2784-
if (PyFrozenSet_Check(anyset) || _PyObject_IsUniquelyReferenced(anyset)) {
2784+
if (PyFrozenSet_Check(anyset) && _PyObject_IsUniquelyReferenced(anyset)) {
27852785
// We can only change frozensets if they are uniquely referenced. The
27862786
// API limits the usage of `PySet_Add` to "fill in the values of brand
27872787
// new frozensets before they are exposed to other code". In this case,

0 commit comments

Comments
 (0)