Replies: 1 comment
-
|
Refer to draft PEP 747 for an overview of 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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to create an isinstance that can return true if the value is of the target type while the target type can be an alias or a union as well as the standard classes and tuples of classes.
I got the code to work correctly at runtime, but I am unable to get pyright to understand the intend when typechecking.
I originally reported it as a bug: #11168, but it seems the issue is related to my implementation.
I was wondering, has anyone implemented something like this before? Any libraries that would do it in a way that type checkers understand? Any suggestions on how to improve the code below?
Thanks,
Joan
Beta Was this translation helpful? Give feedback.
All reactions