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 6d6e858 commit 96c3fe7Copy full SHA for 96c3fe7
1 file changed
stdlib/_typeshed/__init__.pyi
@@ -151,11 +151,8 @@ class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):
151
def keys(self) -> Iterable[_KT]: ...
152
def __getitem__(self, key: _KT, /) -> _VT_co: ...
153
154
-# This protocol is currently under discussion. Use SupportsContainsAndGetItem
155
-# instead, if you require the __contains__ method.
156
-# See https://github.com/python/typeshed/issues/11822.
+# stable
157
class SupportsGetItem(Protocol[_KT_contra, _VT_co]):
158
- def __contains__(self, x: Any, /) -> bool: ...
159
def __getitem__(self, key: _KT_contra, /) -> _VT_co: ...
160
161
# stable
0 commit comments