From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Variables vs. names Date: Sun, 06 Oct 2002 23:25:34 -0700 Message-ID: Martin v. Löwis fed this fish to the penguins on Sunday 06 October 2002 10:44 pm: > aahz at pythoncraft.com (Aahz) writes: > >> Python names don't have values. Names are always references to >> objects. I don't know Java well enough to have any clue how it >> handles references, but I know Java doesn't have pointers. > > I believe newcomers to Java have the same problem that they have in > Python: "If parameters are passed by reference, how come I cannot > modify a variable in the caller?" is a question that I've heard both > for Java and for Python. > Sounds like we need to drop the use of "reference"... If explained as: Python names have associations to values. Passing parameters creates duplicates of the association using the dummy argument names. Assignment to a name changes the association of that name to the new value; it does not change any other associations to the value. the confusion should be reduced.