On Sun, Apr 22, 2012 at 9:22 PM, Terry Reedy <tjre...@udel.edu> wrote: > On 4/22/2012 3:43 PM, John Nagle wrote: >> >> On 4/20/2012 9:34 PM, john.tant...@gmail.com wrote: >>> >>> On Friday, April 20, 2012 12:34:46 PM UTC-7, Rotwang wrote: >>> >>>> I believe it says somewhere in the Python docs that it's undefined and >>>> implementation-dependent whether two identical expressions have the same >>>> identity when the result of each is immutable >> >> >> Bad design. Where "is" is ill-defined, it should raise ValueError. > > > There is no ambiguity about the meaning of 'is' in Python. It is always > well-defined. So the suggestion is a nullity. The equivalent function form > in Python is
Bollocks it's well defined. We've already agreed that "1 is 1" may or may not return True. Then let's just go to the definition: http://mathworld.wolfram.com/Well-Defined.html "An expression is called "well-defined" (or unambiguous) if its definition assigns it a unique interpretation or value. Otherwise, the expression is said to not be well-defined or to be ambiguous. " The same complaint applies to your suggestion that id() is well-defined, and I stopped reading there. -- Devin -- http://mail.python.org/mailman/listinfo/python-list