A question on modification of a list via a function invocation

Steve D'Aprano steve+python at pearwood.info
Sat Aug 19 06:59:16 EDT 2017


On Sat, 19 Aug 2017 08:07 pm, Rick Johnson wrote:

> And why is that so difficult for you to understand? It has
> always seemed perfectly logical to me...
> 
> [A thought experiment]
> Consider automobiles as an example. Automobiles are
> constructed in factories, and they are machines that are
> made of many subcomponents, but we reference the entire
> "conglomeration of subcomponents" (a "car") as single unit,
> and each unit is given a serial number (aka: "Vehicle
> Identification Number"). Now image one day your car is
> wrecked, and your mechanic replaces a few (or all) of the
> subcomponents with new subcomponents... would he also modify
> the VIN? Of course not! Because the subcomponents do not
> define the vehicle. If we want a new vehicle, then we
> request one from the factory.

I'm not sure that the VIN defines the vehicle exactly... I wouldn't want to try
driving a VIN without the rest of the vehicle. The mileage is terrible...

Quoting Fredrik Lundh:

    well, I guess you can, in theory, value an artificial number assigned
    to an object as much as the object itself.

    "Joe, I think our son might be lost in the woods"
    "Don't worry, I have his social security number"



but putting that aside, your car analogy glosses over a genuine paradox here.
Consider that in my family, one of our most precious heirlooms is the axe of my
great-great-great grandfather, which we have passed down from eldest son to
eldest son for generations.

The axe is now almost 200 years old. Of course, occasionally the handle has
broken and we've had to replace it, and from time to time the axe head itself
was so worn out that it had to be replaced, but apart from those repairs the
axe is the same one that my great-great-great grandfather used almost two
centuries ago.

https://plato.stanford.edu/entries/identity-time/



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list