Terminology: "reference" versus "pointer"
breamoreboy at yahoo.co.uk
Sun Sep 13 04:22:58 CEST 2015
On 13/09/2015 01:44, rurpy--- via Python-list wrote:
> On 09/12/2015 06:02 PM, Ned Batchelder wrote:
>> On Saturday, September 12, 2015 at 7:15:18 PM UTC-4, Mark Lawrence wrote:
>> But in C, pointers mean more than that. You can perform arithmetic on
>> them, to access memory as a linearly addressed abstraction. Python has
>> nothing like this.
>> In C, a pointer can refer to another variable. Again, Python has
>> nothing like this. Python names refer to values, but they cannot
>> refer to other names.
>> These last two reasons are why people say that Python does not have
>> As a language concept, Python has no pointers, because you cannot have
>> names referring to names, and because you cannot perform arithmetic on
>> references. The references from names to values are not things that can
>> be manipulated themselves.
> The reason python doesn't have pointers is that the majority of developers
> and documenters chose not to use the term.
> I don't see that pointer arithmetic is necessary to call something a pointer
> (and i think someone else said the same earlier). And references to a name
> I think that is an artifact of C because in C names and values are inextricably
> welded together at compile time -- a pointer to a name is also necessarily a
> pointer to a value. Since there are no C pointers to don't point to values
> they can provide a way to describe Python "things" that also point to values.
There are certainly no C pointers in Jython or IronPython but please
don't let that stop you.
> If one acknowledges that those two properties are not intrinsic requirements
> for pointerness then describing the things "in" a python object that are used
> to identify and dereference other objects, as pointers is not at all unreasonable.
You appear to have the same level of knowledge of Python internals as
the RUE has of the Python 3.3+ FSR unicode implementation. Let's have
some fun, is Python pass by value or pass by reference? It has to be
more interesting debating that than the drivel that's gone before in
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
More information about the Python-list