You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This wasn't possible with TypeGuard due to undesired type narrowing (iterable type would be lost, Sequence[int | None] would become Iterable[int]), but with TypeIs intersection semantics that problem should not arise (Sequence[int| None] & Iterable[int] should be reducible to Sequence[int], if I'm not mistaken, which is the desirable outcome).
Uh oh!
There was an error while loading. Please reload this page.
This issue is supposed to track when we can start to use the
TypeIs
special form (PEP 742) in typeshed. Support is needed in released versions of:Please reference this issue as needed from other issues/PRs to collect places that we might want to update.
Once this is supported, many (most?)
TypeGuard
functions in typeshed should be changed to useTypeIs
.The text was updated successfully, but these errors were encountered: