Commit 8aa8efc1 authored by Sebastien Robin's avatar Sebastien Robin

the default value is always the same, it's better to

define it at class level instead of inside __init__ method

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 929ed43d
......@@ -46,10 +46,12 @@ class Getter(Accessor):
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment