Forum Archive

from __future__ import division

mjb5

Seeing as my email to support has received no response, I'll try this again here. In the interactive prompt, future imports do not seem to work. How can I get from __future__ import division or the equivalent to take effect so that I can interactively use a non-broken division operator?

ccc
print('Begin...')
#from __future__ import division
print('...end.')

Fascinating... Removing the # from the above script causes it to silently fail to print anything at all!

ccc

From future imports must happen very early in a Python script.

http://omz-forums.appspot.com/pythonista/post/6745177418891264