import namespace issues

Alex Martelli aleaxit at yahoo.com
Tue Jul 10 11:51:56 EDT 2001


"Harald Kirsch" <kirschh at lionbioscience.com> wrote in message
news:yv2d779ggaw.fsf at lionsp093.lion-ag.de...
> "Alex Martelli" <aleaxit at yahoo.com> writes:
>
> > "Harald Kirsch" <kirschh at lionbioscience.com> wrote in message
> > news:yv2lmlxgnji.fsf at lionsp093.lion-ag.de...
> > > QUESTION 2:
> > > Is there a detailed description somewhere in the docs about the
> > > namespaces (or dictionaries) used/created/shuffled during an import?
> >
> > I think the documentation for __import__ is pretty clear about
> > it, "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".
>
> I sometimes find that the python docs seem to expect some prior
> knowledge about `obvious behaviour' from the reader and consequently
> are a bit terse. Therefore I believed the above statement only after
> having read the code :-)

Reading the code is hardly a bad thing!  If you understand enough
C to read the Python sources, you'll find most of them clear and
very instructive (there are some exceptions to the clarity, where
things get VERY subtle and hard to follow).


Alex






More information about the Python-list mailing list