[issue34227] Weighted random.sample() (weighted sampling without replacement)

2018-07-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank for the suggestion and patch, but I will decline. To me, the reseviour style algorithm doesn't fit in well (with the slow sorting step and the frequent calls to the random in the key function). For large population sizes (which sample() was

[issue34227] Weighted random.sample() (weighted sampling without replacement)

2018-07-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +mark.dickinson, rhettinger versions: +Python 3.8 ___ Python tracker ___

[issue34227] Weighted random.sample() (weighted sampling without replacement)

2018-07-25 Thread Piotr Jurkiewicz
Change by Piotr Jurkiewicz : -- keywords: +patch pull_requests: +7988 stage: -> patch review ___ Python tracker ___ ___

[issue34227] Weighted random.sample() (weighted sampling without replacement)

2018-07-25 Thread Piotr Jurkiewicz
New submission from Piotr Jurkiewicz : Function random.choices(), which appeared in Python 3.6, allows to perform weighted random sampling with replacement. Function random.sample() performs random sampling without replacement, but cannot do it weighted. I propose to enhance random.sample()

[issue34227] Weighted random.sample() (weighted sampling without replacement)

2018-07-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: