Message82913
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? |
|
Date |
User |
Action |
Args |
2009-02-28 14:56:01 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, terry.reedy, vstinner, debedb |
2009-02-28 14:56:01 | mark.dickinson | set | messageid: <1235832961.43.0.673969876769.issue5377@psf.upfronthosting.co.za> |
2009-02-28 14:56:00 | mark.dickinson | link | issue5377 messages |
2009-02-28 14:55:59 | mark.dickinson | create | |
|