New issue 2619: Difference between variables assigned bound methods in PyPy and 
CPython
https://bitbucket.org/pypy/pypy/issues/2619/difference-between-variables-assigned

Daniel Sutcliffe:

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:  
```
#!python
class Foo:
     def method(self):
        pass

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.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to