Experiences/guidance on teaching Python as a first programming language

Roy Smith roy at panix.com
Mon Dec 9 22:32:34 CET 2013

In article <mailman.3797.1386622419.18130.python-list at python.org>,
 bob gailer <bgailer at gmail.com> wrote:

> Understanding the real machine may be of interest to some but is not 
> essential.

Surprisingly (to myself, anyway), I agree.

Languages like C, Fortran, and Java, are fairly close to the machine.  
They all expose (C more than the others) fundamental machine features 
such as hardware data types (various sizes of ints and floats) and 
addresses.  Understanding how a computer works gives you added 
understanding of how the higher level language you're using works.

But, Python operates at a higher level of abstraction.  In a sense, 
understanding how a computer works is a hinderance to learning Python.  
Look at all the beginner questions we get regarding what

>>> a = 47

means in Python.  People have a mental picture of a 32-bit (or maybe 
64-bit) integer value 47 being placed into some pre-allocated memory 
location, and that interferes with their understanding of what's really 
happening in Python.  Likewise, they have incorrect expectations about 
what happens if that follow that up with

>>> b = a ** 100

More information about the Python-list mailing list