newbie division question
David Isaac
aisaac0 at verizon.net
Mon Sep 18 14:43:04 EDT 2006
Suppose x and y are ints in moduleA.
If I put
from __future__ import division
in moduleA then x/y will produce the truediv result.
If I put
from __future__ import division
in moduleB
and
from moduleB import *
in module A
then x/y will NOT produce the truediv result
(in moduleA).
Why?
And is there some way to avoid importing
from __future__ in module after module?
Thanks,
Alan Isaac
More information about the Python-list
mailing list