Re: from future import scope problem

2009-03-12 Thread John Machin
On Mar 13, 1:20 pm, mykhal wrote: > On Mar 13, 2:58 am, mykhal wrote: > > > > > On Mar 13, 12:46 am, Terry Reedy wrote: > > > > mykhal wrote: > > > > hi, > > > > importing from __future__ seems to have no effect when invoked in > > > > local scope using exec statement. > > > > I supposed > > > >

Re: from future import scope problem

2009-03-12 Thread mykhal
On Mar 13, 2:58 am, mykhal wrote: > On Mar 13, 12:46 am, Terry Reedy wrote: > > > > > > > mykhal wrote: > > > hi, > > > importing from __future__ seems to have no effect when invoked in > > > local scope using exec statement. > > > I supposed > > > > g = {} > > > exec 'from __future__ import divi

Re: from future import scope problem

2009-03-12 Thread mykhal
On Mar 13, 12:46 am, Terry Reedy wrote: > mykhal wrote: > > 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

Re: from future import scope problem

2009-03-12 Thread Terry Reedy
mykhal wrote: 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? Please to read the fine manual. tjr ps.

from future import scope problem

2009-03-12 Thread mykhal
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? -- http://mail.python.org/mailman/listinfo/python-list