[Python-ideas] Support multiplication for sets
MRAB
python at mrabarnett.plus.com
Sat Oct 8 02:39:33 CEST 2011
On 08/10/2011 01:23, Steven D'Aprano wrote:
> Jakob Bowyer wrote:
>> There is that but from a math point of view the syntax a * b does make
>> sence.
>> Its slightly clearer and makes more sense to people from outside of a
>> programming background.
>
>
> I realise that the consensus is that the lack of associativity is a
> fatal problem with a Cartesian product operator, but there are at least
> two other issues I haven't seen.
>
> (1) "Using * for set product makes sense to mathematicians" -- maybe so,
> but those mathematicians already have to learn to use | instead of ∪
> (union) and & instead of ∩ (intersection), so learning to use
> itertools.product() for Cartesian product is not a major burden for them.
>
[snip]
Not to mention = and ==.
More information about the Python-ideas
mailing list