It may be better to make unirand() classmethod: this way it will be possible to use RandomProbDist.unirand() without creating a dummy RandomProbDist instance.