[Python-Dev] == on object tests identity in 3.x
Steven D'Aprano
steve at pearwood.info
Tue Jul 8 19:00:46 CEST 2014
More information about the Python-Dev mailing list
Tue Jul 8 19:00:46 CEST 2014
- Previous message: [Python-Dev] == on object tests identity in 3.x
- Next message: [Python-Dev] == on object tests identity in 3.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Jul 08, 2014 at 04:58:33PM +0200, Anders J. Munch wrote:
> For two NaNs computed differently to compare equal is no worse than 2+2
> comparing equal to 1+3. You're comparing values, not their history.
a = -23
b = -42
if log(a) == log(b):
print "a == b"
--
Steven
- Previous message: [Python-Dev] == on object tests identity in 3.x
- Next message: [Python-Dev] == on object tests identity in 3.x
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list