[pypy-issue] Issue #2248: float.__int__() calls a overridden __int__ method (pypy/pypy)
Armin Rigo
issues-reply at bitbucket.org
Tue Mar 1 15:03:36 EST 2016
New issue 2248: float.__int__() calls a overridden __int__ method
https://bitbucket.org/pypy/pypy/issues/2248/float__int__-calls-a-overridden-__int__
Armin Rigo:
```
#!python
+ def test_override___int__(self):
+ class F(float):
+ def __int__(self):
+ return 666
+ assert int(F(-12.3)) == 666
+ assert float.__int__(F(-12.3)) == -12
```
The last assert fails on pypy but not cpython. Investigate...
More information about the pypy-issue
mailing list