Explaining names vs variables in Python

Marko Rauhamaa marko at pacujo.net
Wed Mar 2 13:12:06 EST 2016


Steven D'Aprano <steve at pearwood.info>:

> In this case, "same object" carries the normal English meaning of
> "same" and the normal computer science meaning of "object" in the
> sense of "Object Oriented Programming". There's no mystery here, no
> circular definition.

I see three possible ways of defining "is" / object identity (and other
concepts):

   1. hand waving ("normal English")

   2. reduction to an underlying model (a real / conceptual computer)

   3. formal semantics

All methods are in use. Experienced programmers have #2 in mind but are
embarrassed to admit they understand Python through C. Thus, they offer
explanation #1 to newbies, who are too embarrassed to admit they don't
get the explanation.

I think #3 could be tried more often. It is analogous to providing the
BNF of Python's syntax (which *is* done: <URL:
https://docs.python.org/3/reference/grammar.html>).


Marko



More information about the Python-list mailing list