~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to tests/input_files/import_vertexlist.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:
 
1
from __future__ import absolute_import
1
2
import copy
2
3
import os
3
4
import math
73
74
            ini_leg = temp_legs_new.pop(num)
74
75
 
75
76
            # Sort the other legs
76
 
            temp_legs_new.sort(lambda l1, l2: cmp(l1['id'],l2['id']), 
77
 
                               reverse=True)
 
77
            temp_legs_new.sort(key=lambda l: l['id'], reverse=True)
78
78
            temp_legs_new.append(ini_leg)
79
79
            temp_vertex = base_objects.Vertex({'id': inter.get('id'),
80
80
                                               'legs':temp_legs_new})