[Python-Dev] packaging

Nick Coghlan ncoghlan at gmail.com
Tue Mar 15 16:23:09 CET 2011


On Tue, Mar 15, 2011 at 9:48 AM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> or if you backport it, we could add a new fallback ;)
>
> try:
>    from __future__ import or_importer
> except ImportError:
>    XXX <-- previous proposal
>  else:
>    or based proposal

Alas, the fallback trick doesn't work for the from __future__ compiler hacks.

What you could do though, is isolate the logic for the import
fallbacks and then do:

from myproject.import_fallbacks import compiler, commands

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list