[Python-ideas] Simpler syntax for basic iterations

Terry Reedy tjreedy at udel.edu
Sun Oct 11 06:37:06 CEST 2015


On 10/10/2015 9:44 PM, Andre Roberge wrote

> On Fri, Oct 9, 2015 at 11:30 PM, Terry Reedy
> <tjreedy at udel.edu
> <mailto:tjreedy at udel.edu>> wrote:

> The reason is that I don't believe in students having to unlearn
> something (like a special repeat syntax available only in a specific
> environment) when they might have been under the impression that it was
> standard Python syntax.

To avoid mis-impressions, non-standard syntax might get a special syntax 
coloring, such as an orange 'warning color' background. Or it could be 
translated line-by-line on entry: enter 'for n' and the line is 
immediately replaced by 'for _ in range(n):'.  (I might like that for my 
own use ;-). Or if the beginner language is really not Python, don't 
call it Python.

I know I don't know how to teach beginning programming, especially to 
children, and I doubt anyone really knows the *best* way.  So I am 
interested in facilitating experiments.

> Furthermore, it might instill doubt in their
> mind about other construct they have learn  (are they standard? ... or
> were they too something only available in the specific environment?...)

I think I understood at a pretty early age that training wheels were a 
special part of a beginner bike for little kids, only present for learning.

>    Python is a fantastic language for beginners (and advanced)
> programmers ... I was just hoping to make it a tiny bit easier to learn
> for complete beginners who are introduced to Python in visual
> environments (like the turtle module or a Karel the Robot clone).

Your are asking for a special case of a special case of something 
already present. In my view, it is like a training wheel - very useful 
when needed, but not so thereafter.  Since it is only needed for a short 
time for young beginners, it only need be present, in my view, in the 
environments used by such beginners.

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list