Message293266
It is also pointless to shuffle a list object repeating the same item, but that is no reason to add a special case. Is there a real problem with allowing dictionaries and OrderedDict? It seems to behave sensibly if you give each item a unique value:
>>> D = {i: i * 100 for i in range(5)}
>>> D
{0: 0, 1: 100, 2: 200, 3: 300, 4: 400}
>>> shuffle(D)
>>> D
{0: 300, 1: 100, 2: 200, 3: 0, 4: 400} |
|
Date |
User |
Action |
Args |
2017-05-09 01:58:20 | martin.panter | set | recipients:
+ martin.panter, rhettinger, steven.daprano |
2017-05-09 01:58:20 | martin.panter | set | messageid: <1494295100.74.0.894202581563.issue30311@psf.upfronthosting.co.za> |
2017-05-09 01:58:20 | martin.panter | link | issue30311 messages |
2017-05-09 01:58:20 | martin.panter | create | |
|