[Erp5-report] r35959 kazuhiko - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 3 16:38:41 CEST 2010


Author: kazuhiko
Date: Thu Jun  3 16:38:38 2010
New Revision: 35959

URL: http://svn.erp5.org?rev=35959&view=rev
Log:
optimise PropertyHolder.getAccessorMethodItemList() a bit.

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=35959&r1=35958&r2=35959&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Thu Jun  3 16:38:38 2010
@@ -431,8 +431,9 @@
     Return a list of tuple (id, method) for every accessor
     """
     accessor_method_item_list = []
+    accessor_method_item_list_append = accessor_method_item_list.append
     for x, y in self._getItemList():
-      if isinstance(y, types.TupleType):
+      if isinstance(y, tuple):
         if y is WORKFLOW_METHOD_MARKER or x == '__ac_permissions__':
           continue
         if len(y) == 0:
@@ -441,7 +442,7 @@
           continue
       elif not isinstance(y, Accessor):
         continue
-      accessor_method_item_list.append((x, y))
+      accessor_method_item_list_append((x, y))
     return accessor_method_item_list
 
   def getAccessorMethodIdList(self):




More information about the Erp5-report mailing list