[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Clarification on Immutability please

On 1/21/20, Jon Ribbens via Python-list <python-list at> 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.)