Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: guard-compatible
Changeset: r83161:a9e78ff3dcb9
Date: 2016-03-19 09:53 +0100
http://bitbucket.org/pypy/pypy/changeset/a9e78ff3dcb9/

Log:    fix translation

diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -313,12 +313,14 @@
 
     @jit.elidable_compatible(quasi_immut_field_name_for_second_arg="version")
     def _type_safe_to_do_getattr(self, version):
+        from pypy.objspace.descroperation import object_getattribute
         # it's safe if the version is not None and the type does not define its
         # own __getattribute__
         if version is None:
             return False
         w_type = self.terminator.w_cls
-        return w_type.has_object_getattribute()
+        w_descr = self._type_lookup_pure('__getattribute__')
+        return w_descr is object_getattribute(self.space)
 
     def _type_lookup(self, name):
         if not self._type_safe_to_do_getattr():
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to