Author: Ronan Lamy <[email protected]>
Branch: online-transforms
Changeset: r74102:ee3b3b9274c1
Date: 2014-10-23 11:15 +0200
http://bitbucket.org/pypy/pypy/changeset/ee3b3b9274c1/

Log:    Handle method_descriptor case

diff --git a/rpython/annotator/bookkeeper.py b/rpython/annotator/bookkeeper.py
--- a/rpython/annotator/bookkeeper.py
+++ b/rpython/annotator/bookkeeper.py
@@ -323,6 +323,10 @@
                     # unbound method
                     cls_s = self.annotationclass(x.im_class)
                     result = cls_s.find_unboundmethod(x.__name__)
+            elif hasattr(x, '__objclass__'):
+                # builtin unbound method on CPython (aka 'method_descriptor')
+                cls_s = self.annotationclass(x.__objclass__)
+                result = cls_s.find_unboundmethod(x.__name__)
             else:
                 result = None
             if result is None:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to