Max Erickson wrote: > Scott David Daniels <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > >>max wrote: >> From the web page referenced: >> ... >> cout << ucEval("abc(5)-abc(3,4)*(#b01101 shl 1)") >> << endl; >>The python equivalent: >> ... >> print eval("abc(5) - abc(3,4) * shl(0x0E, 1)") > > Ouch, I sure was wrong. You did such a good job making me look > foolish that it was mentioned in Python-URL!. Sorry, I wasn't trying to make you look foolish. I was trying to nip a misconception in the bud.
I also forgot how to convert binary to an integer (the #b01101 above) when I was writing it, so that last line should read: print eval("abc(5) - abc(3,4) * shl(int('01101', 2), 1)") --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list