[Python-Dev] New universal import mechanism ( Re: [Python-checkins] python/dist/src/Python import.c,2.210,2.211)
Samuele Pedroni
pedronis@bluewin.ch
Tue, 3 Dec 2002 15:48:12 +0100
From: "David Abrahams" <dave@boost-consulting.com>
> "Samuele Pedroni" <pedronis@bluewin.ch> writes:
...
> > What about
> >
> > from module import x
>
> I had the same thoughts. I am not entirely convinced that what my user
> has asked for is the best approach.
>
> > if the importing module has already a defined x then maybe that
> > should be also under user control?
>
> I don't understand that suggestion. Care to elaborate?
>
my point is that if you offer a way to hook into the behavior of from import *
then you need for completeness and to establish a coherent whole to offer a
hook also in
from import foo,bar
regards.