Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36048>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to