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

2009-07-26 Thread Piet van Oostrum
> ryles (r) wrote: >r> On Jul 25, 8:57 am, Piet van Oostrum wrote: >>> > ryles (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 a

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 wrote: > > ryles (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 it." > >r> Howeve

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

2009-07-25 Thread Piet van Oostrum
> ryles (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 using

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 it