Skip to content

Commit fc04a15

Browse files
committed
-
1 parent 517e089 commit fc04a15

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

source_py3/python_toolbox/combi/perm_space.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,20 @@ def index(self, perm):
653653
@caching.CachedProperty
654654
def unpartialled(self):
655655
'''A non-partial version of this `PermSpace`.'''
656+
assert self.is_partial # Otherwise this property would be overridden.
656657
if self.is_sliced:
657-
raise Exception("Can't convert sliced `PermSpace` directly to "
658-
"unpartialled, because the number of items would "
659-
"be different. Use `.unsliced` first.")
658+
raise Exception(
659+
"Can't convert sliced `PermSpace` directly to unpartialled, "
660+
"because the number of items would be different. Use "
661+
"`.unsliced` first."
662+
)
663+
if self.is_dapplied:
664+
raise Exception(
665+
"Can't convert a partial, dapplied `PermSpace` to "
666+
"non-partialled, because we'll need to extend the domain with "
667+
"more items and we don't know which to use."
668+
)
669+
660670
return PermSpace(
661671
self.sequence_length, domain=self.domain,
662672
n_elements=self.sequence_length, fixed_map=self.fixed_map,

0 commit comments

Comments
 (0)