Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
> My suggestion is not to set k=1 when omitted but to assign it a random value Sorry, I think that is just bizarre. Also, some populations are *very* large, so a minor user accident of omitting a parameter would result in a large unexpected output. For choices(), it would have been nice to have k default the population size (because resampling is a common use case) but we didn't go that path because of the likelihood of a large unexpected output. The same reasoning holds here a well. If you want to go down this path, I recommend making your code explicit about what it is trying to do. Something this unexpected should not be the implicit and default behavior. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46190> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com