[Python-Dev] A proposal has surfaced on comp.lang.pythontoredefine "is"

Skip Montanaro skip at pobox.com
Wed Mar 17 20:41:32 EST 2004


    Andrew> Consider:

    Andrew>     a = []
    Andrew>     b = []
    Andrew>     x = (a, b)
    Andrew>     y = (a, b)

    Andrew> Can you think of a program that can make productive use of the
    Andrew> value of "x is y"?  It seems to me that x and y are mutually
    Andrew> substitutable.

Is "mutually substitutable" a fancy way of saying "equal"?  In other words,
why would "x is y" be preferred over "x == y"?

Skip




More information about the Python-Dev mailing list