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 is really a question, not an issue: is there a way to implement a type-annotated function that takes arguments of different but compatible types, such as "int" and "float"? I was thinking of the set syntax, such as:
@typechecked def f(x: {int, float}): return x*2
Thank you!
The text was updated successfully, but these errors were encountered:
This is really a question, not an issue: is there a way to implement a type-annotated function that takes arguments of different but compatible types, such as "int" and "float"? I was thinking of the set syntax, such as:
@typechecked def f(x: {int, float}): return x*2
Thank you!
The text was updated successfully, but these errors were encountered: