Currently these functions fail if the supplied object has no len(). There are algorithms for this task that can work on any finite iterator (for example, files as a stream of lines), and the functions could fall back to these if there is no len(). _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] Allow random.choice, random.sample to wo... Random832
- Re: [Python-ideas] Allow random.choice, random.sam... Bernardo Sulzbach
- Re: [Python-ideas] Allow random.choice, random... Chris Kaynor
- Re: [Python-ideas] Allow random.choice, ra... Chris Kaynor
- Re: [Python-ideas] Allow random.choice... Bernardo Sulzbach
- Re: [Python-ideas] Allow random.c... Nick Timkovich
- Re: [Python-ideas] Allow rand... Sjoerd Job Postmus
- Re: [Python-ideas] Allow ... Terry Reedy
- Re: [Python-ideas] Allow random.c... Chris Kaynor
- Re: [Python-ideas] Allow rand... Bernardo Sulzbach
- Re: [Python-ideas] Allow random.choice... Steven D'Aprano