Στις 18/6/2013 9:39 πμ, ο/η Larry Hudson έγραψε:
Not quite:  a and b _are_ memory addresses,  At the same time, a and b
are references to the data (the objects) stored in those memory locations.

The distinction is probably more important in languages like C/C++,
where the _language_ gives you direct access to, and can manipulate,
these memory addresses (through pointers).  Python handles it
differently and does not give you this sort of ability, it all occurs
"under the hood".  Yes, the id() function will tell you the addresses,
but you can't do anything with them other than perhaps compare them.
It's really pretty much useless information.

So, a and b are actual memory addresses.

Does the term of a pointer exist in Python?
I mean if print(a) or print(b) outputs the object that a and b are linked to, then how do we access a's and b's memory locations themselves t create links among variables, one pointing to the other and so on?

Can a variable point to another variable or variables never point to other variables but instead are *only* linked to the objects of those var's instead?


--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to