A question on modification of a list via a function invocation

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Sep 6 06:49:08 EDT 2017


Steven D'Aprano wrote:

> But many (perhaps even most) people have no problem dealing with location 
> as a metaphor, where being in two places (metaphorically) is no problem 
> at all:
> 
> - I am in love, in trouble and in denial all at once.

Sometimes the word "in" implies physical location, sometimes
it doesn't.

Being a member of more than one list is a familiar enough
concept, for example, although one would probably say
"on a list" rather than "in a list".

However, "on a list" doesn't really conjure up an image
of physical location. We wouldn't picture ourselves standing
on a piece of paper; rather, we would imagine our name or
other piece of identifying information being written on
the paper.

Dare I say... we would think of a *reference* to us being
on the list? :-)

> 
> Even when the location is not a state of being but an actual physical 
> place, we can be in multiple places at once:
> 
> - I am in my home, in Melbourne, and in Australia all at once.

That's only non-weird because there is a nesting relationship
between those locations. It doesn't extend to more general
topologies. For example, if your home is in Melbourne, then
being in your home and Australia but *not* in Melbourne
would be an interesting trick.
> 
> Being in two places at once is a common trope in both fantasy and science 
> fiction (often involving time travel).

And they're interesting plot devices precisely because they
defy our physical intuition so much. If you're trying to
deconfuse someone about Python semantics, tying their brain
up in knots doesn't seem like a very productive approach!

-- 
Greg



More information about the Python-list mailing list