aboutsummaryrefslogtreecommitdiffstats
path: root/mop/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'mop/__init__.py')
-rw-r--r--mop/__init__.py6
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