On Sep 23, 1:58 pm, Robert Lehmann <[EMAIL PROTECTED]> wrote:
> I don't see why transitivity should apply to Python objects in general.

Hmmm.  Lack of transitivity does produce some, um, interesting
results when playing with sets and dicts.  Here are sets s and
t such that the unions s | t and t | s have different sizes:

>>> from decimal import Decimal
>>> s = set([Decimal(2), 2.0])
>>> t = set([2])
>>> len(s | t)
2
>>> len(t | s)
1

This opens up some wonderful possibilities for hard-to-find bugs...

Mark
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to