import idea
Magnus Lie Hetland
mlh at idi.ntnu.no
Sun Mar 5 08:56:43 EST 2000
This is something we talked about a while back during a discussion
about "Python vs Perl", where powerful one-liners were seen
as a strength of Perl... Having the import implicit would make them
easier in Python too... I seen to remember advocating a switch for this...
I.e. if you run Python with the implicit import switch, it would somehow
("magically") find modules itself... I'm not sure how useful it would be,
though...
--
Magnus
Lie
Hetland magnus @ hetland . org
Joel Lucsy <jjlucsy at concentric.net> wrote in message
news:zVAv4.4321$ik6.612742 at news4.usenetserver.com...
> Is it possible to not have to explicitly do imports? Such as:
> fl=glob.glob('*')
> without the:
> import glob
> Is there a __getattr__ for globals that could trap the glob not being
> present, see if it could import it, etc....?
> Just wondering, I have no current need. Nor do I think it should be a
> standard. Just something that an individual could cook up for his system
to
> really bash out scripts in record time.
>
> --
> - Joel Lucsy (jjlucsy at concentric.net)
>
>
>
>
>
More information about the Python-list
mailing list