[Erp5-report] r30722 - /erp5/trunk/products/ERP5Type/Accessor/Interface.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 18 13:09:53 CET 2009
Author: seb
Date: Wed Nov 18 13:09:50 2009
New Revision: 30722
URL: http://svn.erp5.org?rev=30722&view=rev
Log:
the default value is always the same, it's better to
define it at class level instead of inside __init__ method
Modified:
erp5/trunk/products/ERP5Type/Accessor/Interface.py
Modified: erp5/trunk/products/ERP5Type/Accessor/Interface.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Accessor/Interface.py?rev=30722&r1=30721&r2=30722&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Accessor/Interface.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Accessor/Interface.py [utf8] Wed Nov 18 13:09:50 2009
@@ -46,10 +46,12 @@
func_code.co_argcount = 1
func_defaults = ()
+ # default values
+ _value = None
+
def __init__(self, id, key):
self._id = id
self._key = key
- self._value = None
def __call__(self, instance):
value = self._value
More information about the Erp5-report
mailing list