[pypy-svn] r76102 - pypy/branch/fast-forward/pypy/module/exceptions

benjamin at codespeak.net benjamin at codespeak.net
Sat Jul 10 21:54:30 CEST 2010


Author: benjamin
Date: Sat Jul 10 21:54:28 2010
New Revision: 76102

Modified:
   pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
Log:
be constant enough

Modified: pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	(original)
+++ pypy/branch/fast-forward/pypy/module/exceptions/interp_exceptions.py	Sat Jul 10 21:54:28 2010
@@ -119,7 +119,8 @@
 
     def descr_unicode(self, space):
         w_str = space.lookup(self, "__str__")
-        w_base_str = space.wrap(W_BaseException.typedef.rawdict["__str__"])
+        w_base_type = space.gettypeobject(W_BaseException.typedef)
+        w_base_str = w_base_type.dict_w["__str__"]
         if not space.is_w(w_str, w_base_str):
             w_as_str = space.get_and_call_function(w_str, space.wrap(self))
             return space.call_function(space.w_unicode, w_as_str)



More information about the Pypy-commit mailing list