Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
py3: more care for dictionary changing size
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Jun 27, 2018
1 parent 010ba97 commit 2daf5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/sage/homology/simplicial_set_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,16 +498,16 @@ def __init__(self, data=None, domain=None, codomain=None,
d = {sigma:data[sigma] for sigma in data if sigma.is_nondegenerate()}
# For each simplex in d.keys(), add its faces, and the faces
# of its faces, etc., to d.
for simplex in d.keys():
for simplex in list(d.keys()):
faces = domain.faces(simplex)
add = []
if faces:
for (i,sigma) in enumerate(faces):
for (i, sigma) in enumerate(faces):
nondegen = sigma.nondegenerate()
if nondegen not in d:
add.append((sigma,i,simplex))
add.append((sigma, i, simplex))
while add:
(sigma,i,tau) = add.pop()
(sigma, i, tau) = add.pop()
# sigma is the ith face of tau.
face_f = codomain.face(d[tau], i)
degens = sigma.degeneracies()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/manifolds/topological_submanifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def adapted_chart(self, index="", latex_index=""):
if latex_postscript == "":
latex_postscript = "_" + self._ambient._latex_()

for domain in domains:
for domain in list(domains):
name = " ".join([domain[0][i]._repr_()+postscript+":{"
+ domain[0][i]._latex_()+"}"+latex_postscript
for i in self.irange()]) + " "\
Expand Down

0 comments on commit 2daf5b7

Please sign in to comment.