Steven D'Aprano <[email protected]> writes:
> On Mon, Mar 21, 2016 at 12:18:01AM +1100, Ben Finney wrote:
> > No, I meant what I wrote. The ‘rng’ parameter is expected to be
> > bound to a RNG. If the caller has not specified a custom RNG
> > instance, we bind ‘rng’ to the standard RNG instance found at
> > ‘random.random’.
Steven is right, that name is a function not an RNG.
The code should read::
if rng is None:
rng = random._inst
which is the default RNG instance in the module.
It is also named as an implementation-only attribute, not part of the
module's API. So you may want to find a more reliable API to use.
--
\ “Very few things happen at the right time, and the rest do not |
`\ happen at all. The conscientious historian will correct these |
_o__) defects.” —Mark Twain, _A Horse's Tale_ |
Ben Finney
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor