int(f) == f should be correct. Alex
On Thu, Nov 7, 2013 at 2:51 PM, Laurence Tratt <[email protected]> wrote: > On Thu, Nov 07, 2013 at 11:42:47PM +0100, Amaury Forgeot d'Arc wrote: > > > Hum, [1,2,3].__contains__(1.9)? > > Good point. This is something I clearly got wrong. > > Is there a practical way to tell if a float could ever compare True to an > integer? I suppose I could convert it to an int, and do a comparison back > to > the float? > > > Laurie > _______________________________________________ > pypy-dev mailing list > [email protected] > https://mail.python.org/mailman/listinfo/pypy-dev > -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev
