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. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list