Chris Mellon <[EMAIL PROTECTED]> wrote:

> Any time you port between languages, it's rarely a good idea to just
> convert code verbatim. For example:
>
> import random, string
> def random_char():
>     return random.choice(string.ascii_letters + string.digits)

Note that this code doesn't preserve the output distribution of the
original, for which once expects half the characters to be numeric.  I
don't know if that's relevant; in fact I suspect that the original was
buggy.

-- [mdw]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to