<p>Maybe a configurable or something, so the user can set the way it works, and just document it?? I'm not really sure.</p>
<div class="gmail_quote">On Jul 4, 2012 6:19 PM, "Thomas Kluyver" <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 4 July 2012 17:59, Carl Smith <<a href="mailto:carl.input@gmail.com">carl.input@gmail.com</a>> wrote:<br>
> It'd be nice to have some way of making this work as you presume it will.<br>
> Even if it's caused by a misunderstanding of Python by the user, it's still<br>
> just buggy from a UX perspective.<br>
<br>
I wouldn't say it's a misunderstanding, it's just not clear what<br>
behaviour is correct. future statements don't normally affect code<br>
beyond the module where they're imported. The closest concept to<br>
IPython's embedding in standard Python is to launch a debugger - and<br>
future statements in the module don't hold in the debugger (I've just<br>
checked).<br>
<br>
If we do agree that propagating future flags to embedded IPython is<br>
what we want, I think it should be possible using sys._getframe().<br>
<br>
What's more complex is how it should interact with future statements<br>
you enter yourself in the interpreter. It can't change the future<br>
flags for the module, because that's already been parsed. But if you<br>
embed multiple times, should your changes to __future__ in the first<br>
embedding be kept for the second?<br>
<br>
Thanks,<br>
Thomas<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div>