Collin Winter wrote:
> Do you change
> function X to match the call site or write a function with the proper
> signature that wraps function X? Of course not. You change the call
> site to match the signature.

Or to put it another way, calling this a TypeError assumes
that you were mistaken about which function to call. But
it's just as likely (probably more likely) that you have
the right function but the wrong arguments.

So I think it makes the most sense to have a new exception
such as ArgumentError for this. It says what is wrong
without making assumptions about how it came to be that
way. Subclass it from TypeError if you want backwards
compatibility.

--
Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to