Author tim.peters
Recipients mark.dickinson, rhettinger, serhiy.storchaka, tim.peters, wolma
Date 2018-03-27.03:10:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522120218.25.0.467229070634.issue33144@psf.upfronthosting.co.za>
In-reply-to
Content
I don't see anything objectionable about the class optimizing the implementation of a private method.

I'll note that there's a speed benefit beyond just removing the two type checks in the common case:  the optimized `_randbelow()` also avoids populating its locals with 5 unused formal arguments (which are just "a trick" to change what would otherwise have been global accesses into local accesses).  So it actually makes the method implementation cleaner & clearer too.

But it's really the speed that matters here.
History
Date User Action Args
2018-03-27 03:10:18tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, serhiy.storchaka, wolma
2018-03-27 03:10:18tim.peterssetmessageid: <1522120218.25.0.467229070634.issue33144@psf.upfronthosting.co.za>
2018-03-27 03:10:18tim.peterslinkissue33144 messages
2018-03-27 03:10:17tim.peterscreate