On 16.06.2013 14:55, Dave Angel wrote:
On 06/16/2013 07:22 AM, Andreas Perstinger wrote:
On 16.06.2013 08:32, Denis McMahon wrote:
C:
^^^^^^^^^
int a, b;
b = 6;
a = b;
In C, this places the numeric value 6 into the memory location identified
^^^^^^^^^^^^^
by the variable "b",
so far so good.
then copies the value from the location pointed to by "b" into the
location pointed to by "a".
Wrong. Neither "a" nor "b" are pointers, thus they don't point to a
memory location.
This part should be written as
"then copies the value at the location identified by "b" to the location
identified by "a".
But it doesn't. It binds b to the same object to which a is currently
bound.
Are you aware that Denis was talking about the behaviour of C in the
above quote?
b is a pointer to a memory location containing the value 6
> a is a pointer to another memory location also containing the value 6
Again, neither "a" nor "b" are pointers.
"b" is the name of a memory location containing the integer value 6.
"a" is the name of another memory location containing the integer value 6.
Not even close. If you don't like the terms "bound" or "points", the
perhaps you'd be happy with "b" is the name that currently knows how to
find an int object containing 6. That object has no name, and never
will. And it can exist for a long time with no names directly bound to it.
Again, Denis was talking about C.
Bye, Andreas
--
http://mail.python.org/mailman/listinfo/python-list