Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

There are two issues involved:
1. documenting set behavior
2. what to do, if anything, about Decimals and other numbers

Since users are free to create similar problems, and since sets are
missing from the Reference section on comparisons, I opened a separate
set documentation issue http://bugs.python.org/issue4090
leaving this as a Decimal-other_number equality issue.

The root of the problem is that all members of s are members of t and
vice versa.  This should make s and t equal, but they are not.  This
also breaks the definitions of issubset (<=), issuperset (>=), union
(|), and symmetric_difference (^) as shown in the c.l.p thread.

Transitivity is also fundamental in logic and the rule of substitution.
 So I strongly prefer that it be preserved in Python as released.

Another way to restore transitivity is
(4) make Decimal(1) != int(1) just as Decimal(1) != float(1).  Having a
Decimal be equal in value to just one of two things that are equal in
value is incoherent, and leads to incoherent results.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to