On Fri, 19 Mar 2010 12:16:35 -0700, Glenn Linderman <v+python at 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4