Python 1.5.x vs Python 2.x.x

Martin von Loewis loewis at
Fri Dec 21 17:26:13 EST 2001

Paul Rubin <phr-n2001d at> writes:

> It's a bug if something is gratuitously, unnecessarily incompatible,
> like "rand" disappearing.  What was the reason for that?

rand didn't disappear. It is in lib-old. Furthermore, random is
available since Python 1.0.2 (1994), rand was moved to lib-old in
1.5.1 (1998); I'd say four years are enough time to migrate. Plus, if
you don't want to migrate, you can either add lib-old to sys.path,
or you can use an older Python version (although it is hard these days
to get a pre-built Python 1.4 binary).

There is a good reason to deprecate rand, and all other modules with
duplicate functionality: it is confusing to new users if they see
different ways to achieve the same thing. You have to judge the
advantage to new users (of having a single interface) to the needs
of older users (of not breaking their scripts).


More information about the Python-list mailing list