typeannotations
typeannotations copied to clipboard
Is set of types supported?
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!
Hi! this project is not maintained anymore. For a better alternative, look at the MyPy project: http://mypy-lang.org/