from __future__ import ... within an RExec?

Erik Max Francis max at alcyone.com
Sun Aug 18 06:56:20 CEST 2002


Paul Rubin wrote:

> How about:
> 
> result = eval(re.sub("/","*1.0/", expression))

Yes, there are other solutions with varying levels of hackery involved. 
I'm wondering why a standard feature (from __future__ import division)
doesn't work in a RExec.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ There is nothing so subject to the inconstancy of fortune as war.
\__/ Miguel de Cervantes
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.



More information about the Python-list mailing list