Automatic import PEP
Robert Kern
robert.kern at gmail.com
Fri Oct 6 09:54:23 EDT 2006
Lawrence D'Oliveiro wrote:
> In message <mailman.540.1159128784.10491.python-list at python.org>, Robert
> Kern wrote:
>
>> Lawrence D'Oliveiro wrote:
>>> In message <mailman.491.1158981359.10491.python-list at python.org>,
>>> Connelly Barnes wrote:
>>>
>>>> The main point of autoimp is to make usage of the interactive Python
>>>> prompt more productive by including "from autoimp import *" in the
>>>> PYTHONSTARTUP file.
>>> The main problem I have with your idea is that any kind of import
>>> statement with wildcards in it automatically starts my bogosity meter
>>> flashing its "RED ALERT" sign and clanging all its alarm bells.
>> "from ... import *" was *designed* for interactive use, which is exactly
>> what Connelly is suggesting. It's not a bad thing in that context.
>
> But there is nothing in the language that constrains its use to that
> context, is there?
No. What's your point?
Connelly Barnes states that the main point of autoimp is to make usage of the
interactive prompt better by including "from autoimp import *" into a
PYTHONSTARTUP file. That file is only executed for interactive sessions. He's
not suggesting that people do "from autoimp import *" in their modules.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list