I think one frequent reason people fall back on 'from xxx import *' is simply that typing the whole module name over and over gets tedious and makes the code sprawl. I find 'import xxx as yyy' very useful for this, since it can give you a nice short alias, still readable if you're careful about naming, to sprinkle through the code.

Charles Hartman



On Apr 19, 2006, at 11:18 AM, Daniel Lord wrote:

But 'from xxx import *' makes it too easy to  

forget them since it mashes the namespaces together. I've rarely  

encountered collisions but I try not to be that lazy. I try to use  

'import xxxx' and prefix the module name as often as practical fro  

that reason. 


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to