Objects in Python

Terry Reedy tjreedy at udel.edu
Thu Aug 23 13:17:38 EDT 2012


On 8/23/2012 10:43 AM, Jerry Hill wrote:

> Personally, when I was learning python I found the idea of python
> having names and values (rather than variables and references) to
> clear up a lot of my misconceptions of the python object model.  I
> think it's done the same for other people too, especially those who
> come from the C world, where a variable is a named and typed location
> in memory.

There are two important points about C and assembler. First, the named 
locations (and un-named internal locations like function return 
addresses) are *contiguous*. Giving a user access to one block may give 
a user access to other blocks if one is not careful. The other is that 
the typing is in the code and compiler, but not in the runtime memory. 
So text input can be read as code and a return jump address to the bytes 
interpreted as code.

-- 
Terry Jan Reedy




More information about the Python-list mailing list