Steven D'Aprano wrote:

Another alternative is to testing for key phrases in the exception
message:

    if "too few arguments" in err.args[0]: ...

but that's fragile and only works until the message gets changed to say
"not enough arguments". (The error message is not part of the API, so it
can change without warning.)
 
We are talking here about an exception message that is generated by core Python. So there would be some warning of change, namely the review process for core Python.

I agree that there is a problem to be solved here. Perhaps it is easier and better for core Python to decide to freeze certain messages, than to add a new exception type.
-- 
Jonathan