from future import scope problem

mykhal michal.bozon at gmail.com
Thu Mar 12 16:47:33 EDT 2009


hi,
importing from __future__ seems to have no effect when invoked in
local scope using exec statement.
I supposed

g = {}
exec 'from __future__ import division' in g
eval('1/2', g)

should yield 0.5, but it yields 0.

is it OK, or a bug?



More information about the Python-list mailing list