Aristide Grange added the comment:
My bad... For my reference to Python 2, I relied on my memory only, which
starts to vanish. Really sorry about that. Yes, `random.choice(d)` (mostly)
fails in Python 2 too, with an error message that I better understand after
reading your explanation.
So
New submission from Aristide Grange :
In Python 3, the expression:
```python
random.choice(d)
```
where `d` is a `dict`, raises this error:
```
~/anaconda3/lib/python3.6/random.py in choice(self, seq)
256 except ValueError:
257 raise IndexError('Cannot choose