Clarification on Immutability please
Eryk Sun
eryksun at gmail.com
Wed Jan 22 05:08:18 EST 2020
On 1/21/20, Jon Ribbens via Python-list <python-list at python.org> wrote:
>
> Whether we call the link between 'foo' and (1, 2) a pointer or a
> reference is almost entirely irrelevant, the difference is essentially
> meaningless.
In programming terms, a "pointer" is always an address in memory, and,
at least to me, the term is loaded with semantics from C, such as
pointer types, pointer typecasting, and pointer arithmetic. Python has
no direct analog to these concepts. References in Python are without
type, and memory addresses have no direct role in the language.
(CPython uses an object's memory address as its ID, but that's just an
implementation detail.)
More information about the Python-list
mailing list