-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How strict is type checking for input/output? #517
Comments
No, because these are different types.
Yes, because These are both super simple cases you can just set up and check and see.
The idea is simply that the type of the incoming value or connection should be "as or more specific than" the hint on the receiving channel, hence try:
return issubclass(hint, other)
except TypeError:
return hint == other The function is 60 lines instead of just those 4 lines in order to handle all the combinations of hinted/unhinted, and to try and deal with composite hints (e.g. To be honest, I can't guarantee it is totally robust -- I'm using proof by lack of imagination in that it hasn't failed me yet. |
I am asking to get a clearer picture on how accurate we have to be during save/load if the underlying file format looses the exact type. |
If you want to save/load workflow instances, I believe losing the types of stuff is simply going to break things |
How strict is the type checking for input/output?
Can I provide an
int
output for afloat
input?Can I provide a
float
output for anp.float64
input?The text was updated successfully, but these errors were encountered: