[pypy-svn] r49649 - pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Dec 11 20:36:38 CET 2007


Author: cfbolz
Date: Tue Dec 11 20:36:38 2007
New Revision: 49649

Modified:
   pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__/interp_classobj.py
Log:
deja vu: fix the same XXX in a different place and a different typo


Modified: pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__/interp_classobj.py
==============================================================================
--- pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__/interp_classobj.py	(original)
+++ pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__/interp_classobj.py	Tue Dec 11 20:36:38 2007
@@ -50,7 +50,7 @@
         return self.w_dict
 
     def fset_dict(space, self, w_dict):
-        self.setdict(self, space, w_dict)
+        self.setdict(space, w_dict)
 
     def fdel_dict(space, self):
         raise OperationError(
@@ -175,18 +175,19 @@
     def getdict(self):
         return self.w_dict
 
-    def fget_dict(space, self):
-        return self.w_dict
-
-    def fset_dict(space, self, w_dict):
-        # XXX maybe also implement the setdict() method and move this
-        # logic over there
+    def setdict(self, space, w_dict):
         if not space.is_true(space.isinstance(w_dict, space.w_dict)):
             raise OperationError(
                 space.w_TypeError,
                 space.wrap("__dict__ must be a dictionary object"))
         self.w_dict = w_dict
 
+    def fget_dict(space, self):
+        return self.w_dict
+
+    def fset_dict(space, self, w_dict):
+        self.setdict(space, w_dict)
+
     def fget_class(space, self):
         return self.w_class
 



More information about the Pypy-commit mailing list