[Python-Dev] A proposal has surfaced on
comp.lang.pythontoredefine "is"
Andrew Koenig
ark-mlist at att.net
Wed Mar 17 20:08:14 EST 2004
> Ah, but that would be definite incompatible change in semantics. I
> would be very suprised if this printed "IS":
>
> a = []
> b = []
> if (a, b) is (a, b): print "IS"
> else: print "ISN'T"
Indeed, it would be a change. And I can go along with an argument that an
incompatible change of that magnitude should be rejected for that reason
alone. But why would the change cause a problem? Consider:
a = []
b = []
x = (a, b)
y = (a, b)
Can you think of a program that can make productive use of the value of
"x is y"? It seems to me that x and y are mutually substitutable.
More information about the Python-Dev
mailing list