(slightly OT): Python and linux - very cool

D. C. Sessions dcs at lumbercartel.com
Thu Aug 1 10:15:14 EDT 2002


Roy Culley wrote:

> In article <3D492CAC.E3A37D82 at engcorp.com>,
> 	Peter Hansen <peter at engcorp.com> writes:
>> 
>> Nice post, and welcome to Python, but in this I think you leapt
>> to conclusions a little.  None of the above are actually common
>> issues in Windows with Python.  "from x import *" certainly works
>> properly, even though it's almost never a good idea (hint to newbies:
>> don't do that!).
> 
> I'm a python newbie. How's about expanding on the hint. I just do (as
> an example):
> 
> import os, re, sys, string
> 
> Is that bad also? Maybe we can turn cola into a python tutorial
> newsgroup. :-)

It's not Python-specific.  If you import everything from
a library, you fill up your namespace with methods that
you may not mean to use.  This makes it pretty easy to
use a method that you didn't mean to because it's in the
wrong library.

-- 
|      An engineer is someone who will spend three hours        |
|      figuring out how to do a two-hour job in one hour.       |



More information about the Python-list mailing list