Author: Carl Friedrich Bolz <[email protected]>
Branch: 
Changeset: r82804:395abeb42996
Date: 2016-03-06 00:20 +0100
http://bitbucket.org/pypy/pypy/changeset/395abeb42996/

Log:    trying to fix issue #2083 (see the test). This is a somewhat
        experimental check-in: I couldn't find a failing test caused by the
        removal of this condition. If there is one, it's probably ok to
        simply revert this commit.

diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -432,8 +432,7 @@
     # this is not defined as a method on Function because it's generally
     # useful logic: w_function can be any callable.  It is used by Method too.
     asking_for_bound = (space.is_none(w_cls) or
-                        not space.is_w(w_obj, space.w_None) or
-                        space.is_w(w_cls, space.type(space.w_None)))
+                        not space.is_w(w_obj, space.w_None))
     if asking_for_bound:
         return space.wrap(Method(space, w_function, w_obj, w_cls))
     else:
diff --git a/pypy/interpreter/test/test_function.py 
b/pypy/interpreter/test/test_function.py
--- a/pypy/interpreter/test/test_function.py
+++ b/pypy/interpreter/test/test_function.py
@@ -257,6 +257,9 @@
         meth = func.__get__(obj, object)
         assert meth() == obj
 
+    def test_none_get_interaction(self):
+        assert type(None).__repr__(None) == 'None'
+
     def test_no_get_builtin(self):
         assert not hasattr(dir, '__get__')
         class A(object):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to