This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients debedb, mark.dickinson, rhettinger, terry.reedy, vstinner
Date 2009-02-28.14:42:01
SpamBayes Score 3.561993e-05
Marked as misclassified No
Message-id <1235832124.58.0.0135449360026.issue5377@psf.upfronthosting.co.za>
In-reply-to
Content
@tjreedy: Do you expect conversion to small int if __int__() result 
fits in a small int?

----
class A:
    def __int__(self):
        return 1L

x=int(A())
print repr(x), type(x)
----

Result with Python 2.5.1: 1L <type 'long'>
History
Date User Action Args
2009-02-28 14:42:04vstinnersetrecipients: + vstinner, rhettinger, terry.reedy, mark.dickinson, debedb
2009-02-28 14:42:04vstinnersetmessageid: <1235832124.58.0.0135449360026.issue5377@psf.upfronthosting.co.za>
2009-02-28 14:42:01vstinnerlinkissue5377 messages
2009-02-28 14:42:01vstinnercreate