[IPython-dev] future division in embedded ipython
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" <firstname.lastname@example.org> wrote:
> On 4 July 2012 17:59, Carl Smith <email@example.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
> > 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
> 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?
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev