Closed francesco-ballarin closed 2 years ago
OK, that's my mistake, but still it does not justify the error above.
I've now realized that the failure occurs randomly: approximately 50% of time I run it the test pass (when, based on your comment above, apparently should fail due to wrong argument type in func([g])
, the other 50% it fails with the error in the opening post.
I am now on latest commit.
Correction: your example should work. There was a bug in the type checker, because the builtin Callable
is not considered a subclass of the builtin function
type.
Thanks, the latest commit fixes my issue.
Hi, in my application I would like to dispatch on a sequence of callable.
To this end, I slightly patched your
test_callable
testSuch new test fails with
Notice that the failing line is the call
func(g)
and not my newly added callfunc([g])
.My python version is 3.10, and I am on the latest pypi release with a manual application of 857e4e98299d55fe7097238eae7179287248913f