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
Example 4 @accepts(int, (int,float)) @returns((int,float)) def func(arg1, arg2): return arg1 * arg2
The order of @accepts and @returns should be reversed, otherwise, the assertion will be raised.
Traceback (most recent call last): File "/Users/jack/PycharmProjects/tutorial/testdecorator.py", line 25, in <module> @returns((int,float)) File "/Users/jack/PycharmProjects/tutorial/testdecorator.py", line 3, in check_accepts assert len(types) == f.func_code.co_argcount AssertionError
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Example 4
@accepts(int, (int,float))
@returns((int,float))
def func(arg1, arg2):
return arg1 * arg2
The order of @accepts and @returns should be reversed, otherwise, the assertion will be raised.
The text was updated successfully, but these errors were encountered: