Skip to content

Commit 9dcb17c

Browse files
committed
Fix frozenset() ref count and a comment typo.
1 parent 934d63e commit 9dcb17c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Objects/setobject.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,7 @@ frozenset_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
735735
if (type == &PyFrozenSet_Type) {
736736
if (emptyfrozenset == NULL)
737737
emptyfrozenset = make_new_set(type, NULL);
738-
else
739-
Py_INCREF(emptyfrozenset);
738+
Py_INCREF(emptyfrozenset);
740739
return emptyfrozenset;
741740
}
742741
} else if (PyFrozenSet_CheckExact(iterable)) {
@@ -803,7 +802,7 @@ set_len(PyObject *so)
803802
Useful for creating temporary frozensets from sets for membership testing
804803
in __contains__(), discard(), and remove(). Also useful for operations
805804
that update in-place (by allowing an intermediate result to be swapped
806-
into one of original the inputs).
805+
into one of the original inputs).
807806
*/
808807

809808
static void

0 commit comments

Comments
 (0)