Order in which modules are imported
Dave Hansen
iddw at hotmail.com
Fri Feb 22 18:49:23 EST 2008
On Feb 22, 5:21 pm, tkp... at hotmail.com wrote:
> I imported two modules (random and matplotlib), and found that the
> functions available to me from the random module depended on the order
> in which the imports occured. In particular, if I import random first,
[...]
>
> >>> import random
> >>> from pylab import *
Change this --^ lint to "import pylab" and see what happens. Of
course, that may force other changes in your script...
And remember that "from <module> import *" is never your friend.
Regards,
-=Dave
More information about the Python-list
mailing list