[Tutor] Astonishing timing result
Dick Moores
rdm at rcblue.com
Wed Jun 25 02:27:42 CEST 2008
At 04:49 PM 6/24/2008, Marilyn Davis wrote:
>Does this mean that if __name__ == "__main__" takes the extra time? and
>that that's brings t2 in line with the others?
I don't think so. Please refer to the code again:
<http://py77.python.pastebin.com/f152b6c14>. Line 21 is if
__name__ == '__main__': . Changing this line to
if __name__ != '__main__': increases the time dramatically. But
maybe you meant if __name__ != '__main__': ? If so, you must be
correct. But what's going on here?? Hey, Kent?
> and that the difference
>represents the time it takes to set up a code-block?
What's a code-block?
Dick
>Something like that?
>
>Marilyn Davis
More information about the Tutor
mailing list