On Mon, Nov 9, 2009 at 1:01 PM, Mark Dickinson <dicki...@gmail.com> wrote:
> current behaviour comes from the IEEE 854 standard;  given the
> absence of helpful information in the Decimal standard, IEEE 854
> is an obvious next place to look.  There's an unofficial copy of the
> standard available at:
>
> http://754r.ucbtest.org/standards/854.pdf
>
> Section 5.7 describes twenty-six(!) distinct comparison operators.

It's interesting to note that out of the 32 possible different comparison
behaviours (two choices of result for each of {equal, lessthan,
greaterthan, unordered}, together with a choice of whether to signal
or not for unordered in each case), the two interesting operators
that are missing from that IEEE 854 table are precisely the ones
that we're discussing:  signalling __eq__ (i.e., return False for
lessthan, greaterthan, unordered, True for equal, and signal on
unordered), and signalling __ne__ (the reverse of the above, but
still signalling on unordered).

(The other four missing operators are the uninteresting ones that
always return True or always return False.)

Mark
_______________________________________________
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