claird at lairds.us
Sat Aug 13 02:08:04 CEST 2005
In article <Xns96B0C211F72E8maxericksongmailcom at 18.104.22.168>,
Max Erickson <maxerickson at gmail.com> wrote:
>> The python equivalent:
>> exec "def area(length,width): return length*width"
>> exec "def frac(x): return abs(abs(x) - int(abs(x)))"
>> exec "def test(): return 5"
>> exec "def abc(x, y=10): return x + y"
>> exec "def shl(x, y): return x * 2^y"
>> print eval("frac(150/17) * area(20,30)")
>> print eval("abc(5) - abc(3,4) * shl(0x0E, 1)")
>> --Scott David Daniels
>> Scott.Daniels at Acm.Org
>Ouch, I sure was wrong. You did such a good job making me look
>foolish that it was mentioned in Python-URL!. At least Larry Bates
>had the grace not to call me an idiot.
"Python-URL!" makes a point of highlighting positive achievements.
We all create enough foolishness to obviate any need to pass *that*
More information about the Python-list