From 116377d8b87a6c97108a26f2c8d04925cf4f8ef9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 1 Nov 2014 13:07:48 -0400 Subject: actually, these base method belong in phase 3 --- mop/__init__.py | 14 +++++++------- 1 file 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] -- cgit v1.2.3