On 25/09/17 15:26, Marko Rauhamaa wrote:
Chris Angelico <ros...@gmail.com>:
On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa <ma...@pacujo.net> wrote:
In Python, all expressions evaluate pointers.
And that's an assertion that isn't backed by anything in the Python
specification. Where do you get that all Python expressions are
pointers?
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so Chris' point still stands. Another
implementation could evaluate expressions to indices (as BCPL used to
treat its globals), pieces of string or cheese, who knows?
As for the specification, it doesn't make use of the word "pointer:"
There's a reason for that...
The (English) expression:
The name is bound to the object.
is just another way of saying:
A pointer to the object is stored in the variable.
It really isn't.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list