[Python-ideas] Support multiplication for sets
Stephen J. Turnbull
turnbull at sk.tsukuba.ac.jp
Fri Oct 7 19:15:44 CEST 2011
Paul Moore writes:
> So your multiplication isn't commutative (the types of the elements in
> the 2 expressions above are different).
No, set multiplication is not going to be commutative: {'a'} X {1} is
quite different from {1} X {'a'}. The problem you're pointing out is
much worse: the obvious implementation of Cartesian product isn't even
associative.
-1 on an operator for this.
More information about the Python-ideas
mailing list