[IPython-dev] Where should __future__ statements affect the interactive environment.
Jörgen Stenarson
jorgen.stenarson at kroywen.se
Mon Apr 23 18:04:31 EDT 2012
Fernando Perez skrev 2012-04-23 21:48:
> On Mon, Apr 23, 2012 at 11:46 AM, Aaron Meurer<asmeurer at gmail.com> wrote:
> > Maybe it would be useful to have an %import magic, which would just
> > temporarily add the file path to the front of the python path and
> > import the file. I don't know if it would be useful, though, and the
> > differences between it and %run would be subtle and probably not
> > really understood by non-expert Python users.
>
> Yes, I think something like that is more likely to cause confusion than help.
>
> As long as we have *a* policy re. __future__ in %run, we can just
> document it, which is really what's missing: an explicit and
> documented discussion of what to do re. __future__ in the various
> parts of ipython...
To me it makes most sense to not import any __future__ into the global
namespace unless explicitly asked for by some option (like %run -i). In
short I would prefer to be explicit about what ends up globally.
/Jörgen
More information about the IPython-dev
mailing list