[Python-ideas] Pre-PEP Adding A Secrets Module To The Standard Library

Eric V. Smith eric at trueblade.com
Tue Sep 22 17:04:55 CEST 2015

Sorry to jump in with replying to a random message, but I can't find the
message where this originally showed up:

>>>> Bound methods of a SystemRandom instance
>>>>      .randrange()
>>>>      .randint()
>>>>      .randbits()
>>>>          renamed from .getrandbits()
>>>>      .randbelow(exclusive_upper_bound)
>>>>          renamed from private ._randbelow()
>>>>      .choice()

While we're bikeshedding, can we pick better names than randXXX? How
about random_range(), etc.? I'd rather have clarity than save a few
chars. I think it's more approachable for new users to a new module.


More information about the Python-ideas mailing list