Thanks to visit codestin.com Credit goes to github.com
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 a19bb26 commit d4e1d09Copy full SHA for d4e1d09
Doc/library/typing.rst
@@ -1454,8 +1454,8 @@ These can be used as types in annotations. They all support subscription using
1454
to write such functions in a type-safe manner.
1455
1456
If a ``TypeIs`` function is a class or instance method, then the type in
1457
- ``TypeIs`` maps to the type of the second parameter after ``cls`` or
1458
- ``self``.
+ ``TypeIs`` maps to the type of the second parameter (after ``cls`` or
+ ``self``).
1459
1460
In short, the form ``def foo(arg: TypeA) -> TypeIs[TypeB]: ...``,
1461
means that if ``foo(arg)`` returns ``True``, then ``arg`` is an instance
0 commit comments