Overloaded C++ function Python wrappers now raise a TypeError instead of NotImplementedError

Occurs when the types passed are incorrect. This change means
there is now consistency with non-overloaded function wrappers which have always
raised TypeError when the incorrect types are passed.

See issue #1293
This commit is contained in:
William S Fulton 2018-07-31 19:12:02 +01:00
commit fd651ff4e2
6 changed files with 32 additions and 14 deletions

View file

@ -4894,7 +4894,7 @@ If you don't you'll get an error message along the lines of:
Traceback (most recent call last):
File "runme.py", line 3, in >module<
example.foo(["foo", "bar", "spam", "1"])
NotImplementedError: Wrong number or type of arguments for overloaded function 'foo'.
TypeError: Wrong number or type of arguments for overloaded function 'foo'.
Possible C/C++ prototypes are:
foo(int, char **)
foo()