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

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Dec 11 20:32:59 CET 2007


Author: cfbolz
Date: Tue Dec 11 20:32:58 2007
New Revision: 49647

Modified:
   pypy/branch/interplevel-oldstyle-classes/pypy/module/__builtin__/interp_classobj.py
Log:
an XXX and a 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:32:58 2007
@@ -39,18 +39,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(self, space, w_dict)
+
     def fdel_dict(space, self):
         raise OperationError(
             space.w_TypeError,
@@ -76,7 +77,7 @@
         return space.wrap(self.bases_w)
 
     def fset_bases(space, self, w_bases):
-        # XXX in theory, this misses a check against inheritence cycles
+        # XXX in theory, this misses a check against inheritance cycles
         # although on pypy we don't get a segfault for infinite
         # recursion anyway 
         if not space.is_true(space.isinstance(w_bases, space.w_tuple)):



More information about the Pypy-commit mailing list