~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to tests/input_files/DM_pion/object_library.py

  • Committer: olivier-mattelaer
  • Date: 2020-08-21 09:16:56 UTC
  • mfrom: (284.2.24 python3)
  • Revision ID: olivier-mattelaer-20200821091656-iizux2mj94tkssuo
pass to 2.8.0 (and move to python3 branch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
##
8
8
##
9
9
 
 
10
from __future__ import absolute_import
10
11
import cmath
11
12
import re
 
13
import six
12
14
 
13
15
class UFOError(Exception):
14
16
        """Exception raised if when inconsistencies are detected in the UFO model."""
133
135
        if self.selfconjugate:
134
136
            raise Exception('%s has no anti particle.' % self.name) 
135
137
        outdic = {}
136
 
        for k,v in self.__dict__.iteritems():
 
138
        for k,v in six.iteritems(self.__dict__):
137
139
            if k not in self.require_args_all:                
138
140
                outdic[k] = -v
139
141
        if self.color in [1,8]:
256
258
        parameter or just a string which can possibly contain CTparameter defining the Laurent serie."""
257
259
        
258
260
        if isinstance(self.value,dict):
259
 
            if -x in self.value.keys():
 
261
            if -x in list(self.value.keys()):
260
262
                return self.value[-x]
261
263
            else:
262
264
                return 'ZERO'
269
271
               if not CTparam:
270
272
                   CTparam=param
271
273
               else:
272
 
                   raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values."
 
274
                   raise UFOError("UFO does not support yet more than one occurence of CTParameters in the couplings values.")
273
275
           elif numberOfMatches>1:
274
 
               raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values."
 
276
               raise UFOError("UFO does not support yet more than one occurence of CTParameters in the couplings values.")
275
277
 
276
278
        if not CTparam:
277
279
            if x==0: