From 0b80ace33e3679ab97d58409c4be5d8fd74428c6 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 3 Aug 2007 16:46:53 +0000
Subject: [PATCH] .reverse() and .pop(0) can be simplified into just .pop()

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15475 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/WorkflowTool.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/product/ERP5Type/patches/WorkflowTool.py b/product/ERP5Type/patches/WorkflowTool.py
index 3313c97c0e..7ff217fdc5 100644
--- a/product/ERP5Type/patches/WorkflowTool.py
+++ b/product/ERP5Type/patches/WorkflowTool.py
@@ -181,7 +181,7 @@ def generateNestedQuery(priority_list, criterion_dict, securityQueryHook=None, p
   """
   assert possible_worklist_id_dict is None or len(possible_worklist_id_dict) != 0
   my_priority_list = priority_list[:]
-  my_criterion_id = my_priority_list.pop(0)
+  my_criterion_id = my_priority_list.pop()
   query_list = []
   append = query_list.append
   my_criterion_dict = criterion_dict[my_criterion_id]
@@ -240,7 +240,6 @@ def getWorklistListQuery(grouped_worklist_dict, securityQueryHook):
     return cmp(max([len(x) for x in total_criterion_id_dict[criterion_id_a].itervalues()]),
                max([len(x) for x in total_criterion_id_dict[criterion_id_b].itervalues()]))
   total_criterion_id_list.sort(criterion_id_cmp)
-  total_criterion_id_list.reverse()
   query = generateNestedQuery(priority_list=total_criterion_id_list, criterion_dict=total_criterion_id_dict, securityQueryHook=securityQueryHook)
   assert query is not None
   group_by_expression = ', '.join([x for x in total_criterion_id_dict.keys() if x != SECURITY_PARAMETER_ID])
-- 
2.30.9