@@ -456,7 +456,7 @@ def immutable(m):
456
456
return m
457
457
458
458
if isinstance (mu , dict ):
459
- mu = dict (( a , immutable (M )) for a , M in mu .items ())
459
+ mu = { a : immutable (M ) for a , M in mu .items ()}
460
460
mu = Family (mu )
461
461
462
462
if not mu .is_finite ():
@@ -1284,7 +1284,7 @@ def _add_(self, other):
1284
1284
1285
1285
result = P .element_class (
1286
1286
P ,
1287
- dict (( a , self .mu [a ].block_sum (other .mu [a ])) for a in P .alphabet ()) ,
1287
+ { a : self .mu [a ].block_sum (other .mu [a ]) for a in P .alphabet ()} ,
1288
1288
vector (tuple (self .left ) + tuple (other .left )),
1289
1289
vector (tuple (self .right ) + tuple (other .right )))
1290
1290
@@ -1541,8 +1541,7 @@ def tensor_product(left, right):
1541
1541
return T
1542
1542
result = P .element_class (
1543
1543
P ,
1544
- dict ((a , tensor_product (self .mu [a ], other .mu [a ]))
1545
- for a in P .alphabet ()),
1544
+ {a : tensor_product (self .mu [a ], other .mu [a ]) for a in P .alphabet ()},
1546
1545
vector (tensor_product (Matrix (self .left ), Matrix (other .left ))),
1547
1546
vector (tensor_product (Matrix (self .right ), Matrix (other .right ))))
1548
1547
@@ -2012,7 +2011,7 @@ def one_hadamard(self):
2012
2011
from sage .modules .free_module_element import vector
2013
2012
2014
2013
one = self .coefficient_ring ()(1 )
2015
- return self (dict (( a , Matrix ([[one ]])) for a in self .alphabet ()) ,
2014
+ return self ({ a : Matrix ([[one ]]) for a in self .alphabet ()} ,
2016
2015
vector ([one ]), vector ([one ]))
2017
2016
2018
2017
def _element_constructor_ (self , data ,
0 commit comments