[IPython-dev] Where should __future__ statements affect the interactive environment.

Hans Meine hans_meine at gmx.net
Sun Apr 29 10:38:20 EDT 2012


Am 29.04.2012 um 00:27 schrieb Thomas Kluyver:

> I've resolved the difference between .py and .ipy files with respect
> to __future__, but making %run -i share the shell's __future__ will
> take a bit more work, because of the other options that %run can have.

Great.

I would say the latter has low priority, since – as Min pointed out – even execfile does not share __future__s.  Even if some of use expect %run -i to do, it does not seem to be clear-cut, and adding appropriate statements to the %run file is not much work and makes the intention clear for all cases anyhow.  (In the face of ambiguity, refuse the temptation to guess.)

Best regards,
  Hans


More information about the IPython-dev mailing list