[issue33144] random._randbelow optimization

Raymond Hettinger report at bugs.python.org
Mon Mar 26 23:30:38 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> the optimized `_randbelow()` also avoids populating its locals 
> with 5 unused formal arguments

Yes, that clean-up would be nice as well :-)

Any thoughts on having __init__ set a flag versus using __init__subclass__ to backpatch the subclass?  To me, the former looks like plain python and latter doesn't seem like something that would normally be done in the standard library.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33144>
_______________________________________


More information about the Python-bugs-list mailing list