[Python-Dev] packaging

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 15 01:27:09 CET 2011


Antoine Pitrou wrote:

> But doesn't it also mean many setup.py scripts will have very tedious
> import sequences, such as:
> 
> try:
>     from packaging.compiler import FooCompiler
>     from packaging.commands import BarCommand
> except ImportError:
>     try:
>         from distutils2.compiler import FooCompiler
>         from distutils2.commands import BarCommand
 > ...

Maybe this will be the killer app for the "or" enhancement
to the import statement. :-)

-- 
Greg


More information about the Python-Dev mailing list