[pypy-svn] r56458 - in pypy/dist/pypy: module/itertools objspace/fake

arigo at codespeak.net arigo at codespeak.net
Fri Jul 11 17:42:21 CEST 2008


Author: arigo
Date: Fri Jul 11 17:42:19 2008
New Revision: 56458

Modified:
   pypy/dist/pypy/module/itertools/interp_itertools.py
   pypy/dist/pypy/objspace/fake/objspace.py
Log:
(adurdin, arigo)
- fix(?) some detail in the fake object space
- a comment about non-RPythonic usage; there is more to fix in
  interp_itertools.


Modified: pypy/dist/pypy/module/itertools/interp_itertools.py
==============================================================================
--- pypy/dist/pypy/module/itertools/interp_itertools.py	(original)
+++ pypy/dist/pypy/module/itertools/interp_itertools.py	Fri Jul 11 17:42:19 2008
@@ -476,6 +476,7 @@
         if self.identity_fun:
             return self.space.newtuple(w_objects)
         else:
+            # XXX cannot use '*w_objects'; see space.call()
             return self.space.call_function(self.w_fun, *w_objects)
 
 
@@ -712,3 +713,4 @@
         '_tee',
         __iter__ = interp2app(W_TeeIterable.iter_w, unwrap_spec=['self']),
         next     = interp2app(W_TeeIterable.next_w, unwrap_spec=['self']))
+W_TeeIterable.typedef.acceptable_as_base_class = False

Modified: pypy/dist/pypy/objspace/fake/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/fake/objspace.py	(original)
+++ pypy/dist/pypy/objspace/fake/objspace.py	Fri Jul 11 17:42:19 2008
@@ -1,14 +1,15 @@
 from pypy.interpreter.baseobjspace import ObjSpace, Wrappable, W_Root
+from pypy.interpreter.typedef import TypeDef
 from pypy.rlib.nonconst import NonConstant
 from pypy.rlib.rarithmetic import r_uint
 from pypy.rlib.rbigint import rbigint
 
-class W_Type(W_Root):
-    _attrs_ = ()
+#class W_Type(W_Root):
+#    _attrs_ = ()
 
 class W_Object(W_Root):
     _attrs_ = ()
-W_Object.typedef = W_Type()
+W_Object.typedef = TypeDef('foobar')
 
 def make_dummy(a=W_Object(), b=W_Object()):
     def fn(*args):



More information about the Pypy-commit mailing list