From 7f07f0b3aafa5d5cad8f6d9c2835ea2b26d7c043 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 31 Oct 2014 17:54:45 -0400 Subject: also set_value --- mop/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3-54-g00ecf