Created
October 2, 2014 06:30
-
-
Save oertels/6065c983c8a9d2f1905f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@typecheck | |
def foo(bar:int) -> int: | |
return bar * 2 | |
>>> foo(3) | |
6 | |
>>> foo('bar') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/local/lib/python3.3/dist-packages/typecheck/typecheck_decorator.py", line 332, in typecheck_invocation_proxy | |
str(arg) == "" and "''" or arg)) | |
typecheck.typecheck_decorator.InputParameterError: foo() has got an incompatible value for bar: bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment