Re: Importing * From a Package

2007-08-07 Thread greg
Patrick Doyle wrote: > This is the part that has me confused -- why does "from package import > *" go on to import names that were explicitly loaded by previous > import statements? Because there's no easy way for it *not* to do that. All it does is grab whatever names are defined in the module at

Re: Importing * From a Package

2007-08-07 Thread Patrick Doyle
On 7 Aug 2007 13:54:21 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > "Patrick Doyle" <[EMAIL PROTECTED]> wrote: > > > Why does Python include the submodules that were explicitly loaded by > > previous imports? Does it go out of it's way to do so? If so, why? > > What purpose does it serve? Or,

Re: Importing * From a Package

2007-08-07 Thread Duncan Booth
"Patrick Doyle" <[EMAIL PROTECTED]> wrote: > Why does Python include the submodules that were explicitly loaded by > previous imports? Does it go out of it's way to do so? If so, why? > What purpose does it serve? Or, is it a natural fallout of the manner > in which imports are processed? If s

Re: Importing * From a Package

2007-08-07 Thread Patrick Doyle
> There's no reliable way to differentiate between names which you defined > using something other than an import statement, names you defined with an > import statement with the intent of publishing them as part of your external > API, and names you defined with an import statement which you only

Re: Importing * From a Package

2007-08-06 Thread kyosohma
On Aug 6, 9:06 am, "Patrick Doyle" <[EMAIL PROTECTED]> wrote: > Reading through the Python tutorial, I got to section 6.4.1, > "Importing * From a Package", which states: > > "If __all__ is not defined, the statement from Sound.Effects import * > d

Re: Importing * From a Package

2007-08-06 Thread Jean-Paul Calderone
On Mon, 6 Aug 2007 10:06:51 -0400, Patrick Doyle <[EMAIL PROTECTED]> wrote: >Reading through the Python tutorial, I got to section 6.4.1, >"Importing * From a Package", which states: > >"If __all__ is not defined, the statement from Sound.Effects import * >doe

Importing * From a Package

2007-08-06 Thread Patrick Doyle
Reading through the Python tutorial, I got to section 6.4.1, "Importing * From a Package", which states: "If __all__ is not defined, the statement from Sound.Effects import * does not import all submodules from the package Sound.Effects into the current namespace; ..." It t