Author serhiy.storchaka
Recipients Arfrever, alex, barry, docs@python, eric.snow, ethan.furman, mark.dickinson, ncoghlan, python-dev, serhiy.storchaka, vstinner
Date 2013-12-11.20:20:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386793257.06.0.346996576714.issue17576@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-12-11 20:20:57serhiy.storchakasetrecipients: + serhiy.storchaka, barry, mark.dickinson, ncoghlan, vstinner, Arfrever, alex, docs@python, ethan.furman, python-dev, eric.snow
2013-12-11 20:20:57serhiy.storchakasetmessageid: <1386793257.06.0.346996576714.issue17576@psf.upfronthosting.co.za>
2013-12-11 20:20:57serhiy.storchakalinkissue17576 messages
2013-12-11 20:20:57serhiy.storchakacreate