UCALC equivalent
Scott David Daniels
Scott.Daniels at Acm.Org
Sat Aug 13 10:55:48 EDT 2005
John Machin wrote:
> Scott David Daniels wrote:
>> max wrote:
>>> Larry Bates <lbates at syscononline.com> wrote in
>> The python equivalent:
>> ...
>> exec "def shl(x, y): return x * 2^y"
>
> Perhaps this should be:
> exec "def shl(x, y): return x * 2 ** y"
> or
> exec "def shl(x, y): return x << y"
Exactly.
Demonstrating the problems of not actually running a test case
with known results.
--Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list