En Thu, 25 Sep 2008 08:02:49 -0300, Mark Dickinson <[EMAIL PROTECTED]> escribió:
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

Ouch!

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

And I was thinking all this thread was just a theoretical question without practical consequences...

--
Gabriel Genellina

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

Reply via email to