Question on the Module Import

frank cui frankcui24 at gmail.com
Mon Jan 17 05:01:22 EST 2011


Hi all,

I'm quite a novice in doing python,and i wish to ask you guys a question on
the module import.

Say we have a source file called module1.py.

What's the difference between the " import module1 " and " from module1
import * "

I know that conventionally by coding style, we dont use the second form,but
does the first one also reach the same effect ? (importing all the classes
and functions and pollute the namespace?)

thanks in advance for your answer.

Regards,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110117/08fe175a/attachment.html>


More information about the Python-list mailing list