Message143759
> 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. |
|
Date |
User |
Action |
Args |
2011-09-09 12:04:55 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, ezio.melotti, Julian, john.feuerstein |
2011-09-09 12:04:55 | mark.dickinson | set | messageid: <1315569895.2.0.389107868506.issue12941@psf.upfronthosting.co.za> |
2011-09-09 12:04:54 | mark.dickinson | link | issue12941 messages |
2011-09-09 12:04:54 | mark.dickinson | create | |
|