We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0932e16 commit 68ecfe5Copy full SHA for 68ecfe5
Objects/setobject.c
@@ -2781,7 +2781,7 @@ PySet_Add(PyObject *anyset, PyObject *key)
2781
return rv;
2782
}
2783
2784
- if (PyFrozenSet_Check(anyset) || _PyObject_IsUniquelyReferenced(anyset)) {
+ if (PyFrozenSet_Check(anyset) && _PyObject_IsUniquelyReferenced(anyset)) {
2785
// We can only change frozensets if they are uniquely referenced. The
2786
// API limits the usage of `PySet_Add` to "fill in the values of brand
2787
// new frozensets before they are exposed to other code". In this case,
0 commit comments