[pypy-issue] Issue #2619: Difference between variables assigned bound methods in PyPy and CPython (pypy/pypy)
issues-reply at bitbucket.org
Wed Jul 26 19:42:58 EDT 2017
New issue 2619: Difference between variables assigned bound methods in PyPy and CPython
Apologies if this is covered in in the [differences](http://doc.pypy.org/en/latest/cpython_differences.html) I have read through several times and been extra careful in [section about `id` and `is`](http://doc.pypy.org/en/latest/cpython_differences.html#object-identity-of-primitive-values-is-and-id) but I don't think it applies to this situation.
A bit of code should easily show where the difference is:
foo = Foo()
mth = foo.method
assert(mth is not foo.method)
This works fine in CPython (2.7.13 and 3.5.3) but gives an AssertionError in PyPy 5.8.0 for both the 2.7.13 and 3.5.3 builds.
Unbound method assignments seem to work the same in my testing.
More information about the pypy-issue