[pypy-svn] r34906 - pypy/dist/pypy/objspace/std

mwh at codespeak.net mwh at codespeak.net
Thu Nov 23 16:16:46 CET 2006


Author: mwh
Date: Thu Nov 23 16:16:44 2006
New Revision: 34906

Modified:
   pypy/dist/pypy/objspace/std/typeobject.py
Log:
mostly revert 34903 -- 2.4 only warns when a new-style classes' __init__
returns non-None


Modified: pypy/dist/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/typeobject.py	(original)
+++ pypy/dist/pypy/objspace/std/typeobject.py	Thu Nov 23 16:16:44 2006
@@ -376,9 +376,9 @@
     if space.is_true(space.isinstance(w_newobject, w_type)):
         w_descr = space.lookup(w_newobject, '__init__')
         w_result = space.get_and_call_args(w_descr, w_newobject, __args__)
-        if not space.is_w(w_result, space.w_None):
-            raise OperationError(space.w_TypeError,
-                                 space.wrap("__init__() should return None"))
+##         if not space.is_w(w_result, space.w_None):
+##             raise OperationError(space.w_TypeError,
+##                                  space.wrap("__init__() should return None"))
     return w_newobject
 
 def issubtype__Type_Type(space, w_type1, w_type2):



More information about the Pypy-commit mailing list