On 7/19/07, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> The two advantages that I can see are, I don't need to type as much, and<br>> there would be a speed up in the execution of code.<br><br>Why do you expect a speedup?</blockquote><div><br>In the Python Reference by David Beazley on p. 40, he substituted import math
<br>with from math import sqrt and he switched out d = d + math.sqrt(i) with<br>sqrt(i). He said that that change made the program run twice as fast. So therefore<br>I was under the impression that "from somemodule import someclass" would always be
<br>faster than import somemodule. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> Is there a reason why I shouldn't?
<br><br>If they belong together, put them in a package and use __init__.py. if<br>they don't belong together you are just obscuring the design for very<br>little savings.</blockquote><div><br>Ok, so I will keep the code as is. Thank you Luke and Kent!
<br></div><br>-Tino<br><br></div>