On 4/27/2012 14:07, Kiuhnm wrote:
On 4/27/2012 13:09, Steven D'Aprano wrote:
On Thu, 26 Apr 2012 18:02:31 +0200, Kiuhnm wrote:

On 4/26/2012 16:00, Adam Skutt wrote:
C# and Python do have a misfeature: '==' is identity comparison only if
operator== / __eq__ is not overloaded. Identity comparison and value
comparison are disjoint operations, so it's entirely inappropriate to
combine them.

They're not "disjoint", in fact one almost always implies the other (*).
Python's idea is that, by default, any object is equal to itself and
only itself. The fact that this is equivalent to "identity comparison"
is just a coincidence, from a conceptual point of view.

Define your terms: what do you mean by "equal"?

a and b are equal iff

Nope. What I meant is that we can talk of equality whenever...

a = a
a = b => b = a
a = b and b = c => a = c
If some of this properties are violated, we're talking of something else.

Kiuhnm
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to