Replies: 1 comment
-
You are misinterpreting the PEP. You would need to swap the two overloads to make this work. The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PEP 647, under the heading "TypeGuard Type", says:
However, 1. type checks both in Pyright and mypy, and both seem to treat
TypeGuard
as a subtype ofbool
. This means that the overload order in 2. is significant:Am I misinterpreting the PEP, is this uninentional, or is it intentional and does the PEP need updating?
Beta Was this translation helpful? Give feedback.
All reactions