From a2ba0c8a00385e62655c7fc714b814eeb2533b5a Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Sat, 4 Jun 2022 11:31:13 -0400 Subject: [PATCH] use __new__ instead of __init__ for frozenset (#8019) --- stdlib/builtins.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index a90ba44ff..34b5a9e61 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -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]: ...