Mark Dickinson <[email protected]> added the comment:
> is it really worth adding?
Probably not. For improvements along these lines, I'd rather see random.choice
support sets:
>>> random.choice({1, 2})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/random.py",
line 274, in choice
return seq[int(self.random() * len(seq))] # raises IndexError if seq is
empty
TypeError: 'set' object does not support indexing
But that's another (rejected) issue; see issue 7522.
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12941>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com