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 b2d1056 commit 46b05a4Copy full SHA for 46b05a4
docs/guides/modernizing.rst
@@ -341,3 +341,16 @@ Update your imports to use the new locations::
341
from collections.abc import Hashable, Sized
342
343
def f(x: Hashable) -> Sized: ...
344
+
345
+``typing.TypeGuard``
346
+====================
347
348
+*Available since:* Python 3.13, typing-extensions
349
350
+:data:`TypeIs <typing.TypeIs>` is an alternative to
351
+:data:`TypeGuard <typing.TypeGuard>` that usually has more intuitive
352
+behavior, but has other restrictions. See the documentation for
353
+:data:`TypeIs <typing.TypeIs>` for more information.
354
355
+Review existing uses of :data:`TypeGuard <typing.TypeGuard>` to see if they
356
+should be replaced with :data:`TypeIs <typing.TypeIs>`.
0 commit comments