We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Error occurred when raising TypeError in mapping function.
TypeError
from treevalue import TreeValue, mapping def f(x): raise TypeError if __name__ == '__main__': t = TreeValue({'a': 1, 'b': 2, 'x': {'c': 3, 'd': 4}}) t1 = mapping(t, f)
It will cause this wrong error now.
Traceback (most recent call last): File "test_p.py", line 10, in <module> t1 = mapping(t, f) File "treevalue/tree/tree/functional.pyx", line 47, in treevalue.tree.tree.functional.mapping cpdef TreeValue mapping(TreeValue tree, object func): File "treevalue/tree/tree/functional.pyx", line 77, in treevalue.tree.tree.functional.mapping return type(tree)(_c_mapping(tree._detach(), _ValuePathFuncWrapper(func), ())) File "treevalue/tree/tree/functional.pyx", line 42, in treevalue.tree.tree.functional._c_mapping _d_res[k] = func(v, curpath) File "treevalue/tree/tree/functional.pyx", line 20, in treevalue.tree.tree.functional._ValuePathFuncWrapper.__call__ return self.func() TypeError: f() missing 1 required positional argument: 'x'
The text was updated successfully, but these errors were encountered:
HansBug
Successfully merging a pull request may close this issue.
Error occurred when raising
TypeError
in mapping function.It will cause this wrong error now.
The text was updated successfully, but these errors were encountered: