]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_utils.py
eja: fix cartesian products of cartesian product EJAs.
[sage.d.git] / mjo / eja / eja_utils.py
index e8ed4db2ea23def442af71402cac98c5f5dfccf6..803ec636520515543c873ecc59669475a0048a3c 100644 (file)
@@ -10,12 +10,10 @@ def _all2list(x):
     if hasattr(x, 'list'):
         # Easy case...
         return x.list()
-    if hasattr(x, 'cartesian_factors'):
-        # If it's a formal cartesian product space element, then
-        # we also know what to do...
-        return sum(( x_i.list() for x_i in x ), [])
     else:
-        # But what if it's a tuple or something else?
+        # But what if it's a tuple or something else? This has to
+        # handle cartesian products of cartesian products, too; that's
+        # why it's recursive.
         return sum( map(_all2list,x), [] )
 
 def _mat2vec(m):