Skip to content

Commit

Permalink
Tiny improvement - using a dict comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-rodrigues committed May 14, 2019
1 parent 51b2965 commit 7bb7fb3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions decaylanguage/dec/dec.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,8 @@ def _add_charge_conjugate_decays(self):
# the relevant Trees are the ones describing the decays of ['M10', 'M2-'].
dict_cc_names = self.dict_charge_conjugates()

name2treepos = {} # match name -> position in list self._parsed_decays
for i, t in enumerate(self._parsed_decays):
name2treepos[t.children[0].children[0].value] = i
# match name -> position in list self._parsed_decays
name2treepos = {t.children[0].children[0].value:i for i, t in enumerate(self._parsed_decays)}

trees_to_conjugate = []
misses = []
Expand Down

0 comments on commit 7bb7fb3

Please sign in to comment.