Re: [Python-Dev] == on object tests identity in 3.x

2014-07-08 Thread Steven D'Aprano
On Tue, 08 Jul 2014 16:05:45 -0600, Ian Kelly wrote: > On Tue, Jul 8, 2014 at 3:53 PM, Ian Kelly wrote: >> On Tue, Jul 8, 2014 at 2:10 PM, Anders J. Munch <2...@jmunch.dk> wrote: >>> Steven D'Aprano wrote: - Keeping reflexivity for NANs would have implied some pretty nasty things, e.

Re: [Python-Dev] == on object tests identity in 3.x

2014-07-08 Thread Ian Kelly
On Tue, Jul 8, 2014 at 3:53 PM, Ian Kelly wrote: > On Tue, Jul 8, 2014 at 2:10 PM, Anders J. Munch <2...@jmunch.dk> wrote: >> Steven D'Aprano wrote: >>> - Keeping reflexivity for NANs would have implied some pretty nasty >>>things, e.g. if log(-3) == log(-5), then -3 == -5. >> >> > log(-3)

Re: [Python-Dev] == on object tests identity in 3.x

2014-07-08 Thread Ian Kelly
On Tue, Jul 8, 2014 at 2:10 PM, Anders J. Munch <2...@jmunch.dk> wrote: > Steven D'Aprano wrote: >> - Keeping reflexivity for NANs would have implied some pretty nasty >>things, e.g. if log(-3) == log(-5), then -3 == -5. > > log(-3) > Traceback (most recent call last): > File "", line 1, i

Re: [Python-Dev] == on object tests identity in 3.x

2014-07-08 Thread Anders J. Munch
Steven D'Aprano wrote: - Dropping reflexivity preserves the useful property that NANs compare unequal to everything. Please present an example from real life where that turned out useful, and earn yourself a beer! I've only experienced examples to the contrary. - Keeping reflexivity for