[Python-ideas] Showing qualified names when a function call fails
Steven D'Aprano
steve at pearwood.info
Tue Oct 25 21:22:35 EDT 2016
On Tue, Oct 25, 2016 at 12:17:56PM -0700, Nathaniel Smith wrote:
> I get that this list's default is to push
> back on proposed changes, and it's a good principle in general, but
> "improved error messages" are *really* cheap. The bar should be pretty
> low, IMO.
I think its even lower than most may realise. Error messages are not
part of the official API of the function or class, so IMO we can change
them any time we want, even between point releases.
We shouldn't do so just for the sake of change[1], because chances are
that you'll break somebody's doctests. But doctests that depend on the
exact wording of a error message are already broken. For a sufficiently
good improvement in error reporting, I think we should be free to make
that change without having to wait for a new minor release.
> If someone's willing to do the work to make the error
> messages friendlier, while addressing technical considerations like
> the repr issue, then that's awesome, and if that means that users get
> somewhat redundant information to help them debug then... cool?
Indeed.
> Terseness per se is not a cardinal virtue :-).
"Note the consistent user interface and error reportage. Ed is generous
enough to flag errors, yet prudent enough not to overwhelm the novice
with verbosity."
https://www.gnu.org/fun/jokes/ed-msg.html
--
Steve
More information about the Python-ideas
mailing list