[Python-ideas] Making it easy to prepare for PEP479

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 19 01:06:03 CEST 2015


Steven D'Aprano wrote:
> After all, I might want to write:
> 
> if sys.version != '3.7' and read_config('config.ini')['allow_jabberwocky']:
>     from __future__ import jabberwocky

You might want to, but I would have no qualms about
firmly telling you that you can't. Putting try:
in front of a future import still doesn't introduce
any executable code before it, whereas the above does.

-- 
Greg


More information about the Python-ideas mailing list