Python 1.5.x vs Python 2.x.x
John W. Baxter
jwbaxter at spamcop.net
Sat Dec 29 11:47:33 EST 2001
In article <a0kq1q$lb9ru$1 at ID-11957.news.dfncis.de>, Emile van Sebille
<emile at fenx.com> wrote:
> "James T. Dennis" <jadestar at idiom.com> wrote in message
> news:a0kor6$2o7u$2 at news.idiom.com...
> > Paul Rubin <phr-n2001d at nightsong.com> wrote:
> > > "Fredrik Lundh" <fredrik at pythonware.com> writes:
> > >>> Not bugs per se unless perfect backward compatibility was
> > >>> an overriding concern.
> >
> > >> it isn't.
> >
> > > It's a bug if something is gratuitously, unnecessarily incompatible,
> > > like "rand" disappearing. What was the reason for that?
> >
> > While that topic has come up: I find whrandom to be an unsightly
> > name for accessing a set of functions which is so commonly accessed
> > by novice students. What was wrong with must calling it rand or
> > random? Is it pure pedantry?
>
> whrandom now exists for backwards compatibility purposes and is scheduled
> for deprecation (is this a word? ;-)
See the Python Library Reference, 5.6 random and 5.7 whrandom.
>From the description of the whrandom module:
"This module implements a Wichmann-Hill pseudo-random number
generator..."
I'm sure (without checking) that Google can find you exhausting (er,
exhaustive) details about what that means.
So the wh in the name stands for Wichmann-Hill. IIRC, in early days,
the module was offered as an improvement over the existing random
number module. Now, the random module does Wichmann-Hill, and the old
whrandom name can be retired to the dustbin of history (nice phrase,
glad I invented it ;-)).
Something named rand would likely be based on the C library rand()
function...others can tell you why that's not very interesting these
days.
--John
More information about the Python-list
mailing list