X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=mjo%2Feja%2Feja_utils.py;h=803ec636520515543c873ecc59669475a0048a3c;hb=21fa036e86711c6c28b6d89af2b1bfe4ceb24b29;hp=e8ed4db2ea23def442af71402cac98c5f5dfccf6;hpb=8492b6f01186a5c5df9f7ccb007604958ffdf1f1;p=sage.d.git diff --git a/mjo/eja/eja_utils.py b/mjo/eja/eja_utils.py index e8ed4db..803ec63 100644 --- a/mjo/eja/eja_utils.py +++ b/mjo/eja/eja_utils.py @@ -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):