why cannot assign to function call

Aaron Brady castironpi at gmail.com
Sun Jan 4 00:42:47 CET 2009


On Jan 3, 11:25 am, John O'Hagan <resea... at johnohagan.com> wrote:
> On Tue, 30th Dec 2008, Aaron Brady wrote:
> >Accepting that, I'll adopt the terms John proposed, 'change' vs.
> >'exchange', the former when the material configuration changes, the
> >latter when the communication axioms change.
>
> >b= [2, 3]
> >b= [3, 4]
>
> >'b' has exchanged.  (Somewhat ungrammatical.)
>
> >b= [2, 3]
> >b.append( 4 )
>
> >'b' has changed.
>
> >According to this, when you replace every floorboard on a porch, one
> >at a time, it's still the same porch-- it's changed, it's different,
> >and it's the same.  However, if you haul off the porch and put a new
> >one in its place, it's not.  ('porch[:]=' vs. 'porch='.)  You can't
> >just look at the initial and final configurations of matter to
> >determine so.  Therefore, 'id' is an informal function.
>
> This analogy describes the "ontological minefield" I was referring to in a
> previous post in this thread (which has expired in my mail reader, so my
> apologies if the threading goes awry): In what sense is a porch (or list, or
> string) the same if all (or even some of) its parts have been exchanged?
>
> I think the answer is something to do with the abstraction, the "container",
> the instance of the class. Would it be fair to say that perhaps there are no
> truly mutable objects, only immutable containers whose contents (also
> immutable objects themselves) may be exchanged? Or to pose the question
> another way, are objects only mutable insofar as they are composite?
>
> As you argue above, the planks are not the porch; I would add that it's your
> _decision_ to build (or tear down) a porch which makes it _that_  particular
> porch (or not).
>
> As you imply above (I think), you have to keep looking (or someone does,
> presumably the interpreter) to know whether an object is the same as or just
> equal to another (which starts to sound spookily like the role of "the
> observer" in phenomenology or quantum physics). Whether this means that id()
> is "informal" or not, I'll leave to others better informed than I.
>
> Regards,
>
> John

I think the key ingredient is that there's no such thing as side
effect in math.

In example,

a= [0, 1, 2]
a[:]= [3, 4, 5]

There aren't many natural language senses in which 'a' is the same
object as before.  If I have a leg transplant, I'm the same person,
but if you replace the entire contents of me, I'm not.  But 'a' is.

The porch is defined by its location, but not exclusively.  Natural
language identity is a cluster concept, without strict necessary and
sufficient conditions.  Nothing really presses our boundaries of it
that much; there aren't many practical questions that lay out the
facts, then ask, 'But is it the same?'  You can replace the porch
board-at-a-time, and it is; and you can haul it somewhere and it is.
But rearrange the same boards, and it's not.  Continuity of form is
probably the prevalent feature, which as you state, does break down in
the case of composite (piece-wise) transformations.

You might get farther comparing container objects to spots on a
bulletin board.  The only thing that goes 'in' a container is a
denoting phrase to another object (and by the way, not a description);
the other also has its own spot independently on the board.

It's not clear IMO that the question is so much a minefield-- a
question that it's really easy to get throw (fall) off course
pursuing, as it is that there's no such course.  In short, there is no
such thing as composite identity, only matter; or in Python, only
spots on the bulletin board.

> Or to pose the question
> another way, are objects only mutable insofar as they are composite?

No; tuples are composite.  If I flip one bit in a byte somewhere, is
it the same byte?



More information about the Python-list mailing list