[IPython-dev] future division in embedded ipython

Carl Smith carl.input@gmail....
Wed Jul 4 12:26:38 CDT 2012


Maybe a configurable or something, so the user can set the way it works,
and just document it?? I'm not really sure.
On Jul 4, 2012 6:19 PM, "Thomas Kluyver" <takowl@gmail.com> wrote:

> On 4 July 2012 17:59, Carl Smith <carl.input@gmail.com> wrote:
> > It'd be nice to have some way of making this work as you presume it will.
> > Even if it's caused by a misunderstanding of Python by the user, it's
> still
> > just buggy from a UX perspective.
>
> I wouldn't say it's a misunderstanding, it's just not clear what
> behaviour is correct. future statements don't normally affect code
> beyond the module where they're imported. The closest concept to
> IPython's embedding in standard Python is to launch a debugger - and
> future statements in the module don't hold in the debugger (I've just
> checked).
>
> If we do agree that propagating future flags to embedded IPython is
> what we want, I think it should be possible using sys._getframe().
>
> What's more complex is how it should interact with future statements
> you enter yourself in the interpreter. It can't change the future
> flags for the module, because that's already been parsed. But if you
> embed multiple times, should your changes to __future__ in the first
> embedding be kept for the second?
>
> Thanks,
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20120704/9fa56f22/attachment.html 


More information about the IPython-dev mailing list