diff --git a/openmc/universe.py b/openmc/universe.py index b5bcd866e2..04f2f219d7 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -54,7 +54,7 @@ class Universe(IDManagerMixin): self._volume = None self._atoms = {} - # Keys - Cell IDs + # Keys - Cell IDs # Values - Cells self._cells = OrderedDict() @@ -63,10 +63,9 @@ class Universe(IDManagerMixin): def __repr__(self): string = 'Universe\n' - string += '{0: <16}{1}{2}\n'.format('\tID', '=\t', self._id) - string += '{0: <16}{1}{2}\n'.format('\tName', '=\t', self._name) - string += '{0: <16}{1}{2}\n'.format('\tCells', '=\t', - list(self._cells.keys())) + string += '{: <16}=\t{}\n'.format('\tID', self._id) + string += '{: <16}=\t{}\n'.format('\tName', self._name) + string += '{: <16}=\t{}\n'.format('\tCells', list(self._cells.keys())) return string @property @@ -542,7 +541,7 @@ class Universe(IDManagerMixin): """ # Iterate over all Cells - for cell_id, cell in self._cells.items(): + for cell in self._cells.values(): # If the cell was already written, move on if memo and cell in memo: