__import__(x) VS __import__(x, {}, {}, [''])

Phil phily05 at gmail.com
Sun Aug 23 17:51:32 EDT 2009


I am trying to understand the difference between __import__(x) and
__import__(x, {}, {}, ['']).

The documentations wording was a bit weird for me to understand:
"The standard implementation does not use its locals argument at all,
and uses its globals only to determine the package context of the
import statement."

Does that mean it passes in the globals by default, or does the above
statement stand true only if globals() is passed in?



More information about the Python-list mailing list