Some thougts on cartesian products

Alex Martelli aleax at
Sun Jan 22 13:41:39 EST 2006

Steven D'Aprano <steve at> wrote:
> What advantage is there to creating a "list with cartesian product"
> subclass of list?

Essentially, syntax sugar -- for some people, being able to code a*b
rather than product(a,b) takes on a huge significance; Python chooses to
support this syntax variation by special methods in classes, and thus
encourages people to create classes if they're keen on the syntax.


More information about the Python-list mailing list