[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread shawnberry
shawnberry added the comment: Hi PSF, Upon further review, random.choices() is O(N). I was looping through the values in random.choices() to make it O(N**2) in my code. Next time I will thoroughly check a function on its own before raising any issue. Fyi, BIF is built-in function. Please

[issue35980] Py3 BIF random.choices() is O(N**2) but I've written O(N) code for the same task

2019-02-12 Thread shawnberry
New submission from shawnberry : Please see my GitHub page https://github.com/shawnberry/Improved_random.choices/blob/master/Improved_Py3_BIF_random_dot_choices.py for code that reduces Py3 BIF random.choices() from O(N**2) to O(N). This is my first suggestion to improve Python code. Thanks