[Erp5-report] r43320 luke - /erp5/trunk/products/ERP5Type/tests/Sequence.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 14 17:13:44 CET 2011
Author: luke
Date: Mon Feb 14 17:13:44 2011
New Revision: 43320
URL: http://svn.erp5.org?rev=43320&view=rev
Log:
- implement __getitem__ which will allow to access sequence's
dictionary values without falling back to any default with key error
Modified:
erp5/trunk/products/ERP5Type/tests/Sequence.py
Modified: erp5/trunk/products/ERP5Type/tests/Sequence.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/Sequence.py?rev=43320&r1=43319&r2=43320&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/Sequence.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/Sequence.py [utf8] Mon Feb 14 17:13:44 2011
@@ -99,6 +99,9 @@ class Sequence:
self._played_index = 0
self._context = context
+ def __getitem__(self, key):
+ return self._dict[key]
+
def asText(self):
"""
Representation of the current Sequence. Useful for debuggers.
More information about the Erp5-report
mailing list