[issue17470] random.choice should accept a set as input

2013-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: See also issue #7522 (with an identical title!) for previous discussion. -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue17470] random.choice should accept a set as input

2013-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Mohammad, I concur with David Murray's reasoning. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___

[issue17470] random.choice should accept a set as input

2013-03-18 Thread Jason Ward
Changes by Jason Ward : -- nosy: +Jason.Ward ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17470] random.choice should accept a set as input

2013-03-18 Thread R. David Murray
R. David Murray added the comment: Choice is a very simple function. If it supported sets, it would have to convert the set to a sequence *each time* choice was called. It is probably better to leave this as a task for the user of choice to perform. Sample, on the other hand, does quite a b

[issue17470] random.choice should accept a set as input

2013-03-18 Thread Jason Ward
Changes by Jason Ward : -- keywords: +patch Added file: http://bugs.python.org/file29471/17470.patch ___ Python tracker ___ ___ Python

[issue17470] random.choice should accept a set as input

2013-03-18 Thread Mohammad Akram
New submission from Mohammad Akram: I think the random.choice function should support sets. The random.sample function already supports sets and therefore the API should be consistent in this regard. This is how it's done in the sample method (line 295): if isinstance(population, _Set