Q: Python 2.0 preliminary features?

D'Arcy J.M. Cain darcy at vex.net
Sun Oct 10 21:21:05 EDT 1999


Neel Krishnaswami <neelk at brick.cswv.com> wrote:
> Yes, Python 2.0 will be Perfect(tm). :) Other than that, only Guido 
> knows for sure. 

> Some of the more common requests are:

Here is an uncommon one.  I have already presented this to Guido but
he doesn't feel it should be added.  Perhaps a few more voices will
convince him to rethink it.  I know he isn't _violently_ opposed
because he originally added an earlier version and then backed it out.

crypt takes two parameters, the string to encrypt and the salt.  My
proposal is simply to make the second argument optional in which case
it generates a random salt.

Originally the mods I sent were flawed in that it seeded the RNG on init
of the module.  This was bad because it introduced a change to programs
that did not expect it.  That was the version that Guido backed out and
rightly so.

The corrected version I sent only seeds the RNG the first time it is
called without the second parameter.  That way the only time it happens
is if the programmer specifically expects it to happen.

I am also open to reasons why this is a bad idea.  I currently modify
cryptmodule.c whenever I install Python and have never seen a problem.
I use encryption often enough that not having to do extra work before
the call (or having to use a wrapper function) makes this worthwhile.

What do you think, sirs?

-- 
D'Arcy J.M. Cain <darcy at caingang.com>      |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on         
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.




More information about the Python-list mailing list