Some thougts on cartesian products

Bryan Olson fakeaddress at
Mon Jan 23 05:36:55 EST 2006

Christoph Zwerschke wrote:
> That may be the main problem to decide whether the cartesian product 
> should return a generator or a list.

The Cartesion product is a set.

> That's the other problem. The uses cases (like the password cracker 
> example) are very limited and in these cases you can either write nested 
> loops or write your own cartesian product.

Cartesian product is one of the essential operations of
relational algebra; in that context it's widely useful.
By itself, it's usually not what one wants.


More information about the Python-list mailing list