A question on modification of a list via a function invocation

Chris Angelico rosuav at gmail.com
Wed Sep 6 09:16:36 EDT 2017


On Wed, Sep 6, 2017 at 11:02 PM, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>>The 'is' operator tests if two things are the same thing.
>
>       »Roughly speaking, to say of two things that they are
>       identical is nonsense, and to say of one thing that it
>       is identical with itself is to say nothing at all.«
>
>     Ludwig Wittgenstein, Tractatus Logico-Philosophicus (5.5303)

Yes, and the expression "x is x" is indeed saying nothing at all. But
it's perfectly reasonable, in English, to make statements like:

"Talldad is my father."

"This is my box." (It's not purrfect, but it's mine. [1])

"The President of the US is FD Roosevelt."

Each one corresponds to a Python statement of identity:

print(talldad is self.father)
print(self is chii.box)
print(usa.president is fdr)

In the case of Talldad, one side is absolute and the other side is
relative. (Yes, my father is my relative. Whodathunk?) For a given
'self', the statement will always be consistent. In the case of the
president of the US, it's an attribute that gets reassigned
periodically, so the statement may be true one day and false another.
But it's still fully reasonable to have an absolute identifier for a
specific person, and to ask if that refers to the same individual as
some relative or time-dependent identifier/alias.

ChrisA

[1] https://www.redbubble.com/people/devicatoutlet/works/27806715-this-is-my-box



More information about the Python-list mailing list