On Sun, Sep 16, 2012 at 5:23 PM, Dave Angel <d...@davea.name> wrote:

> On 09/16/2012 07:56 PM, Scurvy Scott wrote:
> > scratch that, new code is below for your perusal:
> >
> > from Crypto.PublicKey import RSA
> > import hashlib
> >
> > def repeat_a_lot():
> >     count = 0
> >     while count < 20:
>
> >You're kidding, aren't you?  while loops are meant for those times when
> >you don't know how many times the loop is to iterate.
>
>
Acutally, Dave, I would be the one setting just how many times the loop
would run manually. Actually the loop would run 2^80 times, so it was more
of a test to see if the output was different each time it ran more than
trying to run it the correct amount of times.


> >         m = RSA.generate(1024)
> >         b = hashlib.sha1()
> >         b.update(str(m))
> >         a = b.hexdigest()
> >         print a[:16] + '.onion'
> >         count += 1
> > repeat_a_lot()
> >
> >
> >
>
> def repeat_a_lot():
>     for _ in xrange(20):
>         m = RSA.generate(1024)
>         b = hashlib.sha1()
>         b.update(str(m))
>         a = b.hexdigest()
>         print a[:16] + '.onion'
>
> repeat_a_lot()
>
>

Why would you use an underscore rather than a letter or name like I've
always seen. I've never seen an underscore used before.

Scott

>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to