diff options
Diffstat (limited to 'mop/__init__.py')
-rw-r--r-- | mop/__init__.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mop/__init__.py b/mop/__init__.py index d5025e7..7d6299b 100644 --- a/mop/__init__.py +++ b/mop/__init__.py @@ -86,6 +86,13 @@ def bootstrap(): Method.__class__ = python_class_for(Class) Attribute.__class__ = python_class_for(Class) + # Phase 2: tie the knot + + Class.metaclass = Class + Class.slots["superclass"] = Object + + # Phase 3: manually assemble enough scaffolding to allow object construction + # this add_method implementation is temporary, since it touches the slots # directly and fiddles with method.__class__ and such - once the full mop # is complete, we won't need to do those things (and they might even be the @@ -115,13 +122,6 @@ def bootstrap(): # case setattr(python_class_for(Method), "execute", method_execute.slots["body"]) - # Phase 2: tie the knot - - Class.metaclass = Class - Class.slots["superclass"] = Object - - # Phase 3: manually assemble enough scaffolding to allow object construction - # temporary, we'll have a better version later def gen_reader(name): return lambda self: self.slots[name] |