Syntax error for simple script

Chris Angelico rosuav at gmail.com
Tue Jun 27 23:30:33 EDT 2017


On Wed, Jun 28, 2017 at 12:46 PM, Steve D'Aprano
<steve+python at pearwood.info> wrote:
> I think that there are broadly two sets of newbies in the world:
>
> - those who will read the message, and be able to resolve the problem from the
> current wording ("oh, it needs parentheses, like a function");
>
> - and those who won't, in which case adding more words to the message won't help
> in the slightest.

And in between are the people who read the message but don't
understand it, and then key it into a web search engine. For those
people, the value isn't necessarily in the clarity of the wording, but
in the specificity of it; as long as Google/DuckDuckGo/Bing/Yahoo can
find the right information given that error as input, it's good
enough. As such, I think the current wording is excellent; I start
typing "missing parentheses" and all four of those search engines
suggest the rest of the message, and all of them have good results
(mainly from Stack Overflow) at the top of the search. Bing and DDG
even pick up part of the answer to show above the results, with DDG
edging out Bing in usefulness.

Or maybe they're a subcategory of the first group. I don't know. In
any case, consistency helps the search engines (it's easier to search
for "missing parentheses in call to print" than for "unexpected error
at <0x13456474678fbcea>" where the hex number varies according to
cause), and brevity (as long as clarity isn't sacrificed) is a huge
advantage in getting the message typed in.

ChrisA



More information about the Python-list mailing list