[pypy-svn] r5563 - pypy/trunk/src/pypy/interpreter

mwh at codespeak.net mwh at codespeak.net
Wed Jul 14 17:55:12 CEST 2004


Author: mwh
Date: Wed Jul 14 17:55:12 2004
New Revision: 5563

Modified:
   pypy/trunk/src/pypy/interpreter/function.py
Log:
Man, that was broken in a variety of ways!


Modified: pypy/trunk/src/pypy/interpreter/function.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/function.py	(original)
+++ pypy/trunk/src/pypy/interpreter/function.py	Wed Jul 14 17:55:12 2004
@@ -117,9 +117,12 @@
 
     def descr_method_getattribute(self, w_attr):
         space = self.space
-        w_result = space.lookup(space.wrap(self), w_attr)
+        w_self = space.wrap(self)
+        w_result = space.lookup(w_self, space.unwrap(w_attr))
         if w_result is None:
             return space.getattr(self.w_function, w_attr)
+        else:
+            return space.get(w_result, w_self)
 
 class StaticMethod(Wrappable):
     """A static method.  Note that there is one class staticmethod at



More information about the Pypy-commit mailing list