NB question on global/local variables in functions

Wolfgang wollez at gmx.net
Sat Jul 15 08:27:13 EDT 2006


Wolfgang schrieb:
>> First, avoid "from function import *" as it pollutes your namespace.  Either
>> import specific symbols or just the module:
>>
>>     from function import fun, fun1
>>     import function
> 
> thanks for the hint! But what is the difference between
> from module import *
> 	and
> import module
> ?
> 

I've figured it out!

when I use "from module import *" then I can call my functions directly

when I use "import module" I need module.function




More information about the Python-list mailing list