"Wayne Watson" <sierra_mtnv...@sbcglobal.net> wrote

There seems to be something of a general consensus in ordering import statements. Something like standard library imports first.

I've never seen anything written down but its true I tend to do that.
But its not been a conscious thing...

tools like matlablib or tkinter (maybe), must one keep an order among the relevant imports?

The order can be significant, especially if the module code has executable statements in it or there are dependencies between them. But with well written modules it should not matter provided you use the straightforward import m style.

It will matter if you use the from m import * method though, because of likely name collisions.

Related to this is the order in which modules are installed. Does it make a difference?

Again it shouldn't but if the installer for one relies on another (eg a GUI library) then it will.

Finally, I'm in the process of moving Python code from XP to Win7. I

Sorry, I know nothing of W7... :-)

Alan G

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

Reply via email to