[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

Oscar Benjamin report at bugs.python.org
Sat Jul 18 06:34:22 EDT 2020


Oscar Benjamin <oscar.j.benjamin at gmail.com> added the comment:

> Please don't get personal.

Sorry, that didn't come across with the intended tone :)

I agree that this could be out of scope for the random module but I wanted to make sure the reasons were considered.

Reading between the lines I get the impression that you'd both be happier with it if the algorithm was exact (rather than using fp). That would at least give the possibility for it to be used internally by e.g. sample/choice if there was a benefit for some cases.

----------

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


More information about the Python-bugs-list mailing list