Mark Dickinson <dicki...@gmail.com> added the comment: 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? _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5377> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com