[Python-ideas] Better error messages [was: (no subject)]

victor rajewski askvictor at gmail.com
Sun Dec 4 18:15:04 EST 2016


Thanks for all of the thoughtful replies (and for moving to a more useful
subject line).

<rant>
There is currently a big push towards teaching coding and computational
thinking to school students, but a lack of skilled teachers to actually be
able to support this, and I don't see any initiatives that will address
this in a long-term, large-scale fashion (I'm speaking primarily from an
Australian perspective, and might be misreading the situation in other
countries). It's worth considering a classroom where the teacher has
minimal experience in programming, and a portion of the students have low
confidence in computing matters. Anything that will empower either the
teacher or the students to get past a block will be useful here; and error
messages are, in my experience as a teacher, one of more threatening parts
of Python for the beginner.
</rant>

A few clarifications and thoughts arising from the discussion:

   - I personally find the current error messages quite useful, and they
   have the advantage of being machine-parseable, so that IDEs such as PyCharm
   can add value to them. However, the audience of this idea is not me, and
   probably not you. It is students who are learning Python, and probably
   haven't done any programming at all. But it might also be casual
   programmers who never really look at error message as they are too
   computer-y.
   - Learning how to parse an error message is a very valuable skill for a
   programmer to learn. However, I believe that should come later on in their
   journey. A technical error message when a student is starting out can be a
   bit overwhelming to some learners, who are already taking in a lot of
   information.
   - I'm not suggesting this should become part of the normal operation of
   Python, particularly if that breaks compatibility or impacts performance. A
   switch, or a seperate executable would probably work. I'd lean against the
   idea of tying this to a particular IDE/environment, but if that's the way
   this can progress, then let's do that to get it moving. However, it has to
   be dead simple to get it running.
   - I think this is necessary for scripts as well as the REPL (also other
   envs like Jupyter notebooks).
   - It will be almost impossible to deal with all cases, but that isn't
   the point here. The trick would be to find the most common errors that a
   beginning programmer will make, find the most common fixes, and provide
   them as hints, or suggestions.
   - The examples listed in my original email are simply ideas, without
   much thought about how feasible (or useful) they are to implement. Going
   forward, we would identify common errors that beginners make, and what
   would help them fix these errors.

-- 

Victor Rajewski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161204/656753c0/attachment.html>


More information about the Python-ideas mailing list