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 serhiy.storchaka
Recipients arhadthedev, calin.culianu, gvanrossum, hroncok, mark.dickinson, remi.lapeyre, serhiy.storchaka, vstinner
Date 2021-12-09.18:25:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639074358.36.0.652397068377.issue36048@roundup.psfhosted.org>
In-reply-to
Content
See issue660144 which made float values be rejected in most cases where an integer is expected rather of silently truncating them. It was at 2003. Guido mentioned that is an age-old problem, so perhaps you can find older discussions on the tracker or mailing lists.

It was a partial solution. It caught unexpected floats, but not other non-integer numbers. Later, the __index__ special method was introduced specially to distinguish objects which can be implicitly converted to integer from these which can be explicitly converted to integer. And finally we fixed that age-old problem.

If you have other questions, please ask them on mailing lists, forums or other resources.
History
Date User Action Args
2021-12-09 18:25:58serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, mark.dickinson, vstinner, hroncok, remi.lapeyre, arhadthedev, calin.culianu
2021-12-09 18:25:58serhiy.storchakasetmessageid: <1639074358.36.0.652397068377.issue36048@roundup.psfhosted.org>
2021-12-09 18:25:58serhiy.storchakalinkissue36048 messages
2021-12-09 18:25:58serhiy.storchakacreate