~maddevelopers/mg5amcnlo/new_clustering

« back to all changes in this revision

Viewing changes to tests/input_files/import_vertexlist.py

  • Committer: Rikkert Frederix
  • Date: 2021-09-09 15:51:40 UTC
  • mfrom: (78.75.502 3.2.1)
  • Revision ID: frederix@physik.uzh.ch-20210909155140-rg6umfq68h6h47cf
merge with 3.2.1

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})