Skip to content

Conversation

@spookylukey
Copy link

This is a documentation only fix, to try to help clarify the issue that I and others are tripping up over in #13957 and the linked discussions.

I think it is particularly necessary because all of the examples in the current docs would be valid examples for the proposed StrictTypeGuard i.e. they return False only when the value doesn't match the type specified in the TypeGuard. That's one of the reasons why it's very easy to assume different semantics.

@spookylukey spookylukey force-pushed the docs/negative-type-narrowing-custom-guards branch from b67fe27 to bef09d2 Compare November 2, 2022 09:22
@spookylukey spookylukey force-pushed the docs/negative-type-narrowing-custom-guards branch from bef09d2 to ef641a1 Compare November 5, 2022 16:42
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits

spookylukey and others added 2 commits November 5, 2022 17:14
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants