Random string of digits?

Chris Angelico rosuav at gmail.com
Sun Dec 25 23:26:48 EST 2011


On Mon, Dec 26, 2011 at 3:17 PM, Roy Smith <roy at panix.com> wrote:
> Of course it is.  Those things constitute doc bugs which need to get
> fixed.  The fact that the specification is flawed does not change the
> fact that it *is* the specification.

Also, the specification is what can be trusted across multiple
implementations of Python - the source can't. I don't intend to get
the source code to five Pythons to ascertain whether getrandbits() is
provided in the default random.Random() of each of them. Now, in this
particular instance, it IS stated in the docs - just down in the
individual function descriptions, which I hadn't read - so I almost
certainly CAN trust that across all platforms. But in the general
case, I would not want to make firm statements on the basis of
implementation details.

ChrisA



More information about the Python-list mailing list