[Erp5-report] r18539 - /erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 28 14:46:54 CET 2007
Author: kazuhiko
Date: Fri Dec 28 14:46:53 2007
New Revision: 18539
URL: http://svn.erp5.org?rev=18539&view=rev
Log:
support __getitem__ with negative value except -1.
Modified:
erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
Modified: erp5/trunk/products/ERP5Type/patches/WorkflowTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/WorkflowTool.py?rev=18539&r1=18538&r2=18539&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/WorkflowTool.py (original)
+++ erp5/trunk/products/ERP5Type/patches/WorkflowTool.py Fri Dec 28 14:46:53 2007
@@ -631,6 +631,9 @@
if index == -1:
return self._slots[-1]
elif isinstance(index, (int, long)):
+ if index < 0:
+ # XXX this implementation is not so good, but rarely used.
+ index += len(self)
iterator = self.__iter__()
for i in xrange(index):
iterator.next()
More information about the Erp5-report
mailing list