sohcahto...@gmail.com writes: > On Thursday, March 5, 2015 at 3:20:16 PM UTC-8, Ben Finney wrote: > > It is fine to define such a type in Python, because 'is' does not > > necessarily imply '=='. > > Do you have an example of where `a is b` but `a != b` in Python?
Maybe I misunderstand your question, but you've already been discussing such an example. Here it is for clarity:: >>> nan = float("NaN") >>> (nan is nan) == (nan == nan) False >>> nan is nan True >>> nan == nan False > `None == None` is True. Right, the Python `None` is not the null I was describing. Python does allow for a null with the semantics I described, because ‘is’ does not imply ‘==’. -- \ “We suffer primarily not from our vices or our weaknesses, but | `\ from our illusions.” —Daniel J. Boorstin, historian, 1914–2004 | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list