Lie Ryan wrote:
On 12/22/2009 10:47 AM, Gib Bogle wrote:
This is indented over one indentation level too much. You want it to
be at the same level as the for above. Here, its at the same level
with "t" -- meaning this entire loop gets repeated five times.
I sorta really recommend a tab width of 4 spaces, not 2 :) At 2, its
_really_ hard (especially if you're newer to Python) to see these
kinds of issues and since indentation is program logic and structure
in Python, that's bad... especially since your comment is indented to
the right level, but the code isn't :)
--S
It turns out that this code isn't a great demo of the advantages of
threading, on my system anyway. The time taken to execute doesn't vary
much when the number of threads is set anywhere from 1 to 6.
it does in mine:
Elapsed Time: 7.47399997711 (with one thread)
Elapsed Time: 1.90199995041 (with five threads)
what sort of weird machine are you in?
Hmmm, interesting. I am running Windows XP on Intel quad core hardware, Q6600.
And you?
--
http://mail.python.org/mailman/listinfo/python-list