I would suggest something like a ~= b, for "approximately equal to". How 
approximately? Well, there would be a default that could be changed 
somewhere.

Don't know if it's all that useful, though.


Tiago A.O.A.

Terry Reedy escreveu:
> "Imri Goldberg" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> | Most experienced programmers know that you shouldn't compare floating
> | point numbers with ==.
>
> As a general statement, this is wrong.  Mark gave examples.
> Please drop the proposal.
>
> The reason for the int division change is the idea that expressions 
> involving integral values should, insofar as possible, have the same value 
> result regardless of the types used to carry the input (or output) values. 
> Hence 1/2 should equal 1.0/2.0 == .5.  The idea that 1 == 1 and 1.0 == 1.0 
> should give a different answer goes against this principle and the 2.x 
> project of number unification.
>
> tjr
>
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/tiagoaoa%40cos.ufrj.br
>
>   

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to