Tim Peters <t...@python.org> added the comment:

I have scant memory of working on this code.  But back then Python wasn't at 
all keen to enforce type checking in harmless contexts.  If, e.g., someone 
found it convenient to pass integers that happened to be in float format to 
randrange(), why not?  Going "tsk, tsk, tsk" won't help them get their work 
done ;-)

If we were restarting from scratch, I'd be happy enough to say "screw floats 
here - _and_ screw operator.index() - this function requires ints, period".  
But, as is, I see insufficient benefit to potentially making code that's been 
working fine for decades "deprecated".

Yes, I realize the code may eventually become marginally faster then.  That 
doesn't, to my eyes, outweigh the certainty of annoying some users.

----------
assignee: tim.peters -> 

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

Reply via email to