[Python-3000] packages in the stdlib

Gareth McCaughan gmccaughan at synaptics-uk.com
Fri Jun 2 11:12:32 CEST 2006


On Thursday 2006-06-01 22:16, Mike Klaas wrote:
> Terry Reedy wrote:
> > Because you have to type it over and over.
> 
> hmm,  With the right context manager:
> 
> import py
> with py as py:
>     from gui import tkinker
>     import net
>     with net as net:
>         import httplib
>         import urllib

That's neat, but I think it's worse in both brevity and clarity
than

    import tkinter
    import httplib, urllib

or even (though here things would change as the number of
imported libraries in each category tends to infinity, which
in practice it probably doesn't) than

    import gui.tkinter
    import net.httplib
    import net.urllib

-- 
g



More information about the Python-3000 mailing list