Pass by reference ?

Gordon McMillan gmcm at hypernet.com
Wed Apr 5 22:02:33 CEST 2000


Robert W. Cunningham wrote:

> The CS models of "Pass By Reference" and "Pass By Value" are fairly well understood,
> but they do not seem to map simply and directly to Python.  

Grrr. Pascal causes brain damage. Python is exactly like Java 
(with the exception of having no primitive types).
 
These notions should state *what* is being passed. In Pascal, 
that's "value of a slot" or "reference to a slot". To be precise, 
in Python it is *always* "value of a reference", (think "pointer 
value", not "value of that which is pointed to").

For all of Herr Werth's genius, he bamboozled millions with his 
little sleight of hand.



- Gordon




More information about the Python-list mailing list