@@ -59,8 +59,8 @@ def __init__(self, iterable_or_length, domain=None, n_elements=None,
5959 len (self .sequence )
6060 self .domain = (domain or
6161 sequence_tools .CuteRange (self .sequence_length ))[:self .n_elements ]
62- self .fixed_map = { key : value for key , value in fixed_map .items () if key
63- in self .domain }
62+ self .fixed_map = dict (( key , value ) for key , value in fixed_map .items ()
63+ if key in self .domain )
6464 self .degrees = \
6565 degrees or sequence_tools .CuteRange (self .sequence_length )
6666 self .is_combination = is_combination
@@ -174,10 +174,10 @@ def _check_variation_selection(variation_selection, perm_space_type,
174174 kwargs ['is_combination' ] = is_combination
175175
176176 if purified_fixed_map != NO_ARGUMENT :
177- kwargs ['fixed_map' ] = actual_fixed_map = {
178- actual_domain [key ]: sequence [value ] for key , value
177+ kwargs ['fixed_map' ] = actual_fixed_map = dict (
178+ ( actual_domain [key ], sequence [value ]) for key , value
179179 in purified_fixed_map .items () if key < len (sequence )
180- }
180+ )
181181 else :
182182 actual_fixed_map = {}
183183
@@ -320,10 +320,10 @@ def _check_variation_selection(variation_selection, perm_space_type,
320320 else :
321321 assert type (perm ) == Perm
322322
323- if variation_selection .variations <= {
323+ if variation_selection .variations <= set ((
324324 perming .variations .Variation .DAPPLIED ,
325325 perming .variations .Variation .RAPPLIED ,
326- perming .variations .Variation .COMBINATION ,} :
326+ perming .variations .Variation .COMBINATION )) :
327327 assert perm .nominal_perm_space == perm_space
328328 assert perm .nominal_perm_space == \
329329 perm_space ._nominal_perm_space_of_perms == \
0 commit comments