11 Dec
2013
11 Dec
'13
12:20 p.m.
Serhiy Storchaka added the comment: Even with last patch int() can return non-int:
class A(int): ... def __int__(self): return True ... def __repr__(self): return '<A>' ... class B: ... def __int__(self): return A() ... class C: ... def __trunc__(self): return A() ... int(B()) <A> int(C()) True
----------
_______________________________________
Python tracker