On Wed, 4 Mar 2020 at 12:33, Chris Angelico <ros...@gmail.com> wrote: > Being able to easily distinguish "that isn't callable" from "the > parameters don't line up" from "the function, during execution, raised > TypeError" would be useful.
I **completely** agree. And I add that the change can also be non-breaking, if the new ArgumentError is simply a subclass of TypeError. Yes, it's incorrect, but this way no old code will break. PS: if you read the official docs (https://docs.python.org/3/library/exceptions.html#TypeError): > exception TypeError > Raised when an operation or function is applied to an object of inappropriate > type. etc. It's never stated that TypeError should be raised when the number of arguments is invalid, for example. It seems that TypeError itself is saying "now I'm used outside my scope" :-) _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/FAD44C2LVEK6CY4DV7C6OSBXQKWUVRLD/ Code of Conduct: http://python.org/psf/codeofconduct/