What other languages use the same data model as Python?

Ethan Furman ethan at stoneleaf.us
Mon May 9 13:15:05 EDT 2011


Steven D'Aprano wrote:
> But that's wrong! Names (little boxes) can't point to *slots in a list*, 
> any more than they can point to other names! This doesn't work:
> 
> 
> --> L = [None, 42, None]
> --> a = L[0]
> --> L[0] = 23
> --> print(a)  # This doesn't work!
>  23

Minor nitpick -- having a comment saying "this doesn't work" then having 
output showing that it does is confusing.  I had to load up the 
interpretor to make sure I was confused!  ;)

~Ethan~



More information about the Python-list mailing list