On Nov 14, 12:08 pm, Mark Wooding <[EMAIL PROTECTED]> wrote: > 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]
I couldn't have said it better myself. Well, if not better, at least earlier... (http://groups.google.com/group/comp.lang.python/msg/580779bf57e4d3a0? hl=en) -- Paul -- http://mail.python.org/mailman/listinfo/python-list