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 mark.dickinson
Recipients debedb, mark.dickinson, rhettinger, terry.reedy, vstinner
Date 2009-02-28.14:55:59
SpamBayes Score 2.6532692e-08
Marked as misclassified No
Message-id <1235832961.43.0.673969876769.issue5377@psf.upfronthosting.co.za>
In-reply-to
Content
The behaviour doesn't contradict the documentation, as far as I can 
tell, 
so I agree with Terry that this is not a bug.

If we want the result from the built-in int function to have type int 
whenever possible (that is, whenever the result is in the closed 
interval 
[-sys.maxint-1, sys.maxint], it doesn't seem right that the burden for 
ensuring this should lie with individual __int__ methods:  instead, the 
general machinery for implementing the built-in int function should 
check 
any result of type long to see if it fits in an int, and convert if so.

Is this desirable?
History
Date User Action Args
2009-02-28 14:56:01mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, terry.reedy, vstinner, debedb
2009-02-28 14:56:01mark.dickinsonsetmessageid: <1235832961.43.0.673969876769.issue5377@psf.upfronthosting.co.za>
2009-02-28 14:56:00mark.dickinsonlinkissue5377 messages
2009-02-28 14:55:59mark.dickinsoncreate