@Willem wrote:
Hi,
Running a python script form the editor, divisions like
1/8are true division; returning0.125However, If I create a module.py and import that for use in my main script; I get the old floor division behaviour where
1/8returns0This can be corrected byfrom __future__ import divisionin my modules, but it seems a setup that is error prone.Is this a bug or by design, and furthermore how to make sure imported modules behave as the main module?
What additional future behavior should I import to make sure all python scripts and modules behave equally regardless of them being main modules or imported ones?Thanks
-Willem
Posts: 1
Participants: 1