use __new__ instead of __init__ for frozenset (#8019)

This commit is contained in:
Jim Bosch
2022-06-04 11:31:13 -04:00
committed by GitHub
parent 0ce825b5a8
commit a2ba0c8a00

View File

@@ -1101,9 +1101,9 @@ class set(MutableSet[_T], Generic[_T]):
class frozenset(AbstractSet[_T_co], Generic[_T_co]):
@overload
def __init__(self) -> None: ...
def __new__(cls: type[Self]) -> Self: ...
@overload
def __init__(self, __iterable: Iterable[_T_co]) -> None: ...
def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...
def copy(self) -> frozenset[_T_co]: ...
def difference(self, *s: Iterable[object]) -> frozenset[_T_co]: ...
def intersection(self, *s: Iterable[object]) -> frozenset[_T_co]: ...