Steven D'Aprano writes:
> Proposal: add a new exception, ParameterError, for parameter
> errors. For backwards compatibility it would have to be a subclass
> of TypeError.
To me, that name evokes all kinds of things that linters and mypy do,
but the Python interpreter can't or shouldn't.
Func
At the moment, when you call a function, if there is any mismatch
between the function parameters and the supplied arguments, TypeError is
raised.
For example:
# Too few arguments
len()
# Too many arguments
ord('a', 'b')
# Invalid keywords
min([], func=len)
etc. (There