random number including 1 - i.e. [0,1]

Robert Kern robert.kern at gmail.com
Thu Jun 11 01:54:18 CEST 2009


On 2009-06-10 16:47, Mark Dickinson wrote:

> And of course I'm wrong.  I shouldn't have said *never*, above:
>
>>>> from random import uniform
>>>> uniform(-1e308, 1e308)
> inf
>
> :-(
>
> Somehow this doesn't seem worth either fixing or documenting, though.

Agreed.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list