rand.py: added some docs