Skip to content

Commit 33d4dae

Browse files
committed
Trac #21325 review comment 14+15: rewrite construction dict
1 parent 3b7c431 commit 33d4dae

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/sage/combinat/k_regular_sequence.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,15 +675,14 @@ def partial_sums(self, include_n=False):
675675
k = P.k
676676
dim = self.dimension()
677677

678-
B = dict((r, sum(self.mu[a] for a in A[r:])) for r in A)
678+
B = {r: sum(self.mu[a] for a in A[r:]) for r in A}
679679
Z = zero_matrix(dim)
680680
B[k] = Z
681681
W = B[0].stack(Z)
682682

683683
result = P.element_class(
684684
P,
685-
dict((r, W.augment((-B[r+1]).stack(self.mu[r])))
686-
for r in A),
685+
{r: W.augment((-B[r+1]).stack(self.mu[r])) for r in A},
687686
vector(tuple(self.left) +
688687
(dim*(0,) if include_n else tuple(-self.left))),
689688
vector(2*tuple(self.right)))

0 commit comments

Comments
 (0)