Commit d9365263 authored by Kevin Deldycke's avatar Kevin Deldycke

add a little warning about cartesianProduct


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3504 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 517fc31c
......@@ -93,6 +93,11 @@ def convertToMixedCase(key):
# Some set operations
def cartesianProduct(list_of_list):
"""
Be carefull : one mathematical property of cartesian product is that
when you do a cartesian products of a set and an empty set, the result
is an empty set.
"""
if len(list_of_list) == 0:
return [[]]
result = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment