Harmonise UserDict.__init__ with dict.__init__ (#6490)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Alex Waygood
2021-12-04 17:50:47 +00:00
committed by GitHub
parent 56c45528b7
commit f105c79219
2 changed files with 14 additions and 3 deletions

View File

@@ -816,6 +816,7 @@ class list(MutableSequence[_T], Generic[_T]):
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
# __init__ should be kept roughly in line with `collections.UserDict.__init__`, which has similar semantics
@overload
def __init__(self: dict[_KT, _VT]) -> None: ...
@overload