Re: Why doesn't `from pkg import mod' work after `del pkg.mod'?

2009-07-26 Thread Piet van Oostrum
ryles ryle...@gmail.com (r) wrote: r On Jul 25, 8:57 am, Piet van Oostrum p...@cs.uu.nl wrote: ryles ryle...@gmail.com (r) wrote: r According tohttp://www.python.org/doc/essays/packages.html: r The import statement first tests whether the item is defined in the r package; if not, it assumes

Re: Why doesn't `from pkg import mod' work after `del pkg.mod'?

2009-07-25 Thread Piet van Oostrum
ryles ryle...@gmail.com (r) wrote: r According to http://www.python.org/doc/essays/packages.html: r The import statement first tests whether the item is defined in the r package; if not, it assumes it is a module and attempts to load it. r However, I've noticed that once a module is imported

Re: Why doesn't `from pkg import mod' work after `del pkg.mod'?

2009-07-25 Thread ryles
On Jul 25, 8:57 am, Piet van Oostrum p...@cs.uu.nl wrote: ryles ryle...@gmail.com (r) wrote: r According tohttp://www.python.org/doc/essays/packages.html: r The import statement first tests whether the item is defined in the r package; if not, it assumes it is a module and attempts to load

Why doesn't `from pkg import mod' work after `del pkg.mod'?

2009-07-24 Thread ryles
According to http://www.python.org/doc/essays/packages.html: The import statement first tests whether the item is defined in the package; if not, it assumes it is a module and attempts to load it. However, I've noticed that once a module is imported using the `from pkg import mod' syntax, if its