[Python-3000] PEP 3100 Comments

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 9 08:28:23 CEST 2006


Guido van Rossum wrote:
> Now we're talking. Although it might make more sense if (an
> abbreviated form of) its repr() were included in the error message --
> that would help most humans diagnose the situation most easily.

While we're on the subject, something that causes me
intense annoyance from time to time is when I get a
message like "Method foobar expects m args, got n",
but it doesn't tell me *which* of the myriad foobar
methods in my program it was trying to call.

It would be much more helpful if it could say something
like "Method YourModule.YourClass.foobar ..."

This might require storing a bit more information
in a function at def time. But it wouldn't be as
difficult as in the earlier discussions about having
a method reference its class, because we don't need
the actual class, just its name.

--
Greg


More information about the Python-3000 mailing list