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): population = tuple(population) ---------- components: Library (Lib) messages: 184532 nosy: Mohammad.Akram priority: normal severity: normal status: open title: random.choice should accept a set as input type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17470> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com