[IPython-dev] future division in embedded ipython
Thomas Kluyver
takowl at gmail.com
Wed Jul 4 10:39:25 EDT 2012
On 4 July 2012 14:12, Joon Ro <joonpyro at gmail.com> wrote:
> I'm using ipython 0.13. I just found that even though my main script has
> from __future__ import division, the embedded ipython session I still get
> 1/2 = 0
> It has caused me some confusion and I was wondering if this is a bug.
The effect of future statements isn't currently carried across - they
don't work the same way as variables. It's not exactly a bug, but
maybe it's something we want to change.
See also discussion here on future statements in startup files:
https://github.com/ipython/ipython/pull/950#issuecomment-4993045
Thomas
More information about the IPython-dev
mailing list