On Fri, 19 Mar 2010 12:16:35 -0700, Glenn Linderman <v+pyt...@g.nevcal.com> 
wrote:
> On 3/19/2010 11:43 AM, Terry Reedy wrote:
> > It still strikes me as a bit crazy for Python to say that 0.0 == 0 and 
> > 0 == Decimal(0) but that 0.0 != Decimal(0). Who would expect such a 
> > thing?
> 
> The same person that would expect both
> 
> 0 == "0"
> 0.0 == "0.0"
> 
> to be False... i.e. anyone that hasn't coded in Perl for too many years.

No, those two situations are not comparable.

"if a equals b and b equals c, then a equals c" is what most people
will expect.  In fact, only mathematicians are likely to know
that any other situation could possibly be valid.  Programmers are
generally going to view it as a bug.

--
R. David Murray                                      www.bitdance.com
_______________________________________________
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