I sent George a private reply as discussing other languages gets rapidly 
off-topic.

I want to add a small addendum here about the technique he used and a Dave Neal
and others are trying, a way to imagine things that is more compatible with how
a language like Python works so it meets expectation.

Your example was name= obj.name and you saw it as a convenience.

But consider some form of linked list, perhaps a multidimensional one
like a tree or generalized graph. If you are traversing the list there is a 
concept
of following a sort of pointer to the "next" and once there following that to 
the
"next" and so on, till you find what you want or reach a leaf node and back up
and so on.

So your routine may have multiple lines that look like:

here = here.next

As you traverse, "here" keeps moving and a sublist or subtree or whatever lies 
below you. It is not a convenience but a portable way to keep track of your 
current
location. It keeps changing. And, in some cases, you retreat back and follow
a nextleft or nextright pointer of sorts.

In examples like that, the construct is not for convenience but simply because
it makes no sense to approach an arbitrary data structure and have to
say first.next.next.next.next ...

Also noted is your use of a direct pointer had positive and also negative
ramifications to consider. It is not a synonym just for convenience.


-----Original Message-----
From: Paul St George <em...@paulstgeorge.com>
To: python-list@python.org
Sent: Tue, Mar 22, 2022 4:52 pm
Subject: Re: for convenience


On 21/03/2022 17.47, Avi Gross wrote:



> So, I ask Paul what other language than python he has used before, just out 
> of curiosity.



The other language I have used (and often) is Processing. Before that, and a 
long time ago, Lingo. 



—

Paul













-- 

https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to