@@ -933,20 +933,16 @@ def _create_with_cut_prefix(cls, sequence, domain=None, *,
933933 n_elements = None , fixed_map = None , degrees = None , is_combination = False ,
934934 slice_ = None , perm_type = None , shit_set = frozenset ()):
935935 '''
936- Create a `PermSpace`, cutting off a prefix if possible.
936+ Create a `PermSpace`, cutting a prefix off the start if possible.
937937
938- blocktododoc
938+ This is used internally in `PermSpace.__getitem__` and
939+ `PermSpace.index`. It's important to cut off the prefix, especially for
940+ `CombSpace` because in such cases it obviates the need for a
941+ `fixed_map`, and `CombSpace` doesn't work with `fixed_map`.
939942 '''
940-
941- # Tricky thing here: Trying to put as much as we can in a sequence head
942- # that'll shorten the sequence we'll give to the candidate space
943- # instead of using a fixed map, if possible. This is crucial for
944- # `CombSpace` which can't use `fixed_map`.
945-
946943 if degrees is not None :
947944 raise NotImplementedError
948945
949-
950946 prefix = []
951947 fixed_map = dict (fixed_map )
952948 for i in sequence_tools .CuteRange (infinity ):
@@ -981,8 +977,6 @@ def _create_with_cut_prefix(cls, sequence, domain=None, *,
981977 )
982978 perm_space .prefix = tuple (prefix )
983979 return perm_space
984-
985-
986980
987981
988982
0 commit comments