diff options
-rw-r--r-- | mop/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mop/__init__.py b/mop/__init__.py index 4d83191..296c013 100644 --- a/mop/__init__.py +++ b/mop/__init__.py @@ -227,6 +227,12 @@ def bootstrap(): name="get_value", body=get_value )) + def set_value(self, instance, new_value): + instance.slots[self.get_name()] = new_value + Attribute.add_method(Method.new( + name="set_value", body=set_value + )) + # here's the better implementation # note that we can't replace the implementation of the methods implemented # by the previous gen_reader because that would end up recursive |