On Fri, Oct 23, 2020 at 02:23:58AM -0400, David Mertz wrote:
> See my very detailed posts on EXACTLY the concepts you discuss.
> 
> "whether 'bar' is a name"? It is definitely a name, what you have no means
> > to know is whether it has been assigned a value. I suspect you're trying to
> > do the thing some people do where they insist on 'name' to avoid using the
> > term 'variable'
> 
> 
> I have no idea what you are trying to make "is a name" mean.  In an
> ordinary and Python sense, an unbound "name" isn't a name.

I think you and Random (and possibly Chris?) are talking past each 
other.

At the level of syntax, of course 'bar' is a name. It's not a for-loop, 
or a keyword, or a float literal, etc. The language reference refers to 
things like 'bar' as identifiers:

https://docs.python.org/3/reference/lexical_analysis.html#identifiers

and explicitly gives "name" as a synonym. So from that perspective, 
there is no doubt that 'bar' is a name.

At the level of Python code, identifiers/names are not values at all, 
let alone first-class values.

https://en.wikipedia.org/wiki/First-class_citizen

So within the universe of Python values, identifiers don't exist. Bound 
names *have* a value bound to them; unbound names don't even have that.

I'm not sure why this distinction is so relevant to the discussion, but 
the distinction does exist, and I think that consequently David and 
Random are arguing at cross-purposes.

David, I think, is focused on the fact that an unbound name doesn't even 
have a value so it can't be anything at all: unbound names are not 
things you can manipulate within the universe of Python values.

Random is, I think, focused on the fact that name is syntactically a 
name whether it is bound or not, or even whether it appears in the 
source code. Is "Albuquerque" a (Python) name or not?

And consequently I think the two points of view are incommensurable, a 
bit like centrifugal force. In some frames of reference, centrifugal 
force is very real, and in others, it doesn't exist.

I don't think that arguing one perspective is right and the other is 
wrong is productive. But if we can't see both perspectives, we cannot 
effectively communicate with each other.


-- 
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/UK22KVDJEUJXPT5AZW55VLBZBZDNYMQA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to