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 tim.peters
Recipients mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2020-03-23.01:47:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584928030.05.0.944021852989.issue37319@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-03-23 01:47:10tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, serhiy.storchaka
2020-03-23 01:47:10tim.peterssetmessageid: <1584928030.05.0.944021852989.issue37319@roundup.psfhosted.org>
2020-03-23 01:47:10tim.peterslinkissue37319 messages
2020-03-23 01:47:09tim.peterscreate